Query Notification Tray Item

The getNotificationTrayItems() method returns a Live collection of notification tray items for the current user, typically used when rendering the Notification Tray screen. It supports pagination for infinite scrolling. Each item represents a distinct notification event, including properties like actors, actionType, templatedText, timestamp, and seen status, providing all necessary data to render a standard notification entry.

Event (actionType)

Trigger

Tray Message

Post

(Text, Image, Video)

Given Bob & Alice are members of the same community When Bob creates a post in that community Then Alice should see a notification record in the notification tray about this action

For single notification record: Bob posted in {{communityDisplayName}}

Post

(Text, Image, Video)

Given Bob, Alice, Charlie, and Daniel are members of the same community When more than one member creates a post in the same community within the same day Then Alice should see a grouped notification record about this

For grouped notification record with 2 actors: {{displayName_1}} and {displayName_2}} posted in {{communityDisplayName}} -------------------------------- For grouped notification record with 3 or more actors: {{displayName_1}} and {{number}} others posted in {{communityDisplayName}}

Poll

Given Bob & Alice are members of the same community When Bob starts a poll in that community Then Alice should see a notification in the notification tray about this action

Bob started a poll in {{communityDisplayName}}

Comment

When Bob comments on Alice’s post Then Alice should see a notification in the notification tray about this action

Bob commented on your post in {{communityDisplayName}}

-------------------------------- If Alice’s post was posted on Alice’s user feed: Bob commented on your post on your feed -------------------------------- If Alice’s post was posted on Charlie’s user feed: Bob commented on your post on {{targetUserDisplayName}} feed

Reply

When Bob replies to Alice’s comment Then Alice should see a notification in the notification tray about this action

Bob replied to your comment in {{communityDisplayName}}

-------------------------------- If Bob replies to Alice’s comment on Charlie’s feed Bob replied to your comment on Charlie feed

-------------------------------- If Bob replies to Alice’s comment on Alice’s feed Bob replied to your comment on your feed

-------------------------------- If Bob replied to Alice’s comment on Bob’s feed Bob replied to your comment on their feed

Reaction

When any user reacts on Alice’s post or comments Then Alice should see a notification record about this

For single notification record: {{displayName}} reacted to your {{target}} in {{communityDisplayName}}

where target = post, poll, comment, or reply

--------------------------------

For grouped notification record with 2 actors: {{displayName_1}} and {displayName_2}} reacted to your {{target}} in {{communityDisplayName}}

--------------------------------

For grouped notification record with 3 or more actors: {{displayName_1}} and {{number}} others reacted to your {{target}} in {{communityDisplayName}}

-------------------------------- If Bob reacted to Alice’s post on Alice’s feed, then: Bob reacted to your post on your feed

--------------------------------

If Bob reacted to Alice’s post on Bob’s feed, then Bob reacted to your post on their feed

--------------------------------

If Bob reacted to Alice’s post on Charlie’s feed, then Bob reacted to your post on Charlie’s feed

Mention

When any user mentions Alice in a post or comment Then Alice should see a notification record about this

If user is mentioned in a post: {{displayName}} mentioned you in a post in {{communityDisplayName}}

--------------------------------

If Bob mentioned Alice in a post on Bob’s feed then Bob mentioned you in a {{post / comment}} on their feed

--------------------------------

If Bob mentioned Alice in a post on Alice’s feed, then Bob mentioned you in a {{post / comment}} on your feed

--------------------------------

If Bob mentioned Alice in a post on Charlie’s feed, then Bob mentioned you in a {{post/comment}} on Charlie’s feed

--------------------------------

If user is mentioned in a poll: {{displayName}} mentioned you in a poll in {{communityDisplayName}}

--------------------------------

*similar copywriting as above for user feed

If user is mentioned in a comment: {{displayName}} mentioned you in a comment in {{communityDisplayName}} -------------------------------- *similar copywriting as above for user feed

If user is mentioned in a reply: {{displayName}} mentioned you in a reply in {{communityDisplayName}} -------------------------------- *similar copywriting as above for user feed

Last updated

Was this helpful?