OptionalShouldOptional callback that consuming apps can set to suppress toast notifications for specific events (e.g., when the user is actively viewing the conversation that triggered the notification). Return true to suppress the toast. The notification DB record is still created and the badge count still updates.
Static ReadonlyNotifications$Observable stream of the current user's notifications, derived from UserInfoEngine.UserNotifications$. Emits immediately on subscribe (shareReplay buffers the latest value) and re-emits whenever the engine's notifications cache is mutated — by save, delete, remote-invalidate, or refresh. Each emission re-runs the engine's per-user filter+sort.
Static ReadonlyUnreadObservable stream of the current user's unread notification count, derived from Notifications$. Same emission lifecycle as Notifications$.
Instance method to access Notifications$ observable
Instance method to access UnreadCount$ observable
StaticInstanceStaticUnreadThe current user's unread notification count, delegated to UserInfoEngine.
StaticUnreadThe current user's unread notifications, delegated to UserInfoEngine.
StaticUserThe current user's notifications, delegated to UserInfoEngine which owns the cache. Applies the per-user filter and newest-first sort on each access.
Creates a user notification in the database and refreshes the UI. Returns the notification object.
Any object, it is converted to a string by JSON.stringify and stored in the database
Creates a message that is not saved to the User Notifications table, but is displayed to the user. Uses a lightweight DOM-based toast notification.
text to display
display styling
OptionalhideAfter: numberoption to auto hide after the specified delay in milliseconds
StaticRefreshRefresh user notifications from the server. Delegates to UserInfoEngine.RefreshItem, whose successful reload mutates the engine's notifications cache and triggers an emission on Notifications$/UnreadCount$ via the BaseEngine observable plumbing — subscribers are updated automatically with no manual re-emit required here.
Uses RefreshItem() rather than relying solely on the global CACHE_INVALIDATION listener: when this method is called in response to a PushStatusUpdates message, the cache-invalidation event may not have arrived yet (separate WebSocket message, potential race). RefreshItem() eliminates that race by doing a targeted RunView for just notifications.
StaticUpdate
Multi-provider note: callers under a non-default provider should set
service.Provider = component.ProviderToUsebefore invoking any methods.