[Missing Object] Notifications are shown as minimized (#6416)

* Add minimize to the notification model and minimize missing object notifications

* Add test

* Short circuit telemetry api functions if passed in domainObject is missing/type unknown

* Clear notifications properly after test
This commit is contained in:
Khalid Adil
2023-03-14 13:36:45 -05:00
committed by GitHub
parent b5002e166a
commit 600890c4a6
5 changed files with 29 additions and 3 deletions

View File

@ -264,7 +264,7 @@ export default class TelemetryAPI {
* telemetry data
*/
async request(domainObject) {
if (this.noRequestProviderForAllObjects) {
if (this.noRequestProviderForAllObjects || domainObject.type === 'unknown') {
return [];
}
@ -318,6 +318,10 @@ export default class TelemetryAPI {
* the subscription
*/
subscribe(domainObject, callback, options) {
if (domainObject.type === 'unknown') {
return () => {};
}
const provider = this.#findSubscriptionProvider(domainObject);
if (!this.subscribeCache) {