-
Notifications
You must be signed in to change notification settings - Fork 39
Clarify push notifs and DM stitching #465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -162,10 +162,14 @@ For example, with DM stitching, instead of seeing two separate DM conversations | |
|
|
||
| DM stitching provides a unified UX in the app. However, the multiple DM conversations under the hood must still be addressed for push notifications. | ||
|
|
||
| Let's take DM conversations alix-bo-1 and alix-bo-3 between `alix.id` and `bo.id`. With DM stitching, these two conversations display as one conversation. However, we must remember that they have two different conversation IDs, and thus two different topics. | ||
| Let's take DM conversations alix-bo-1 and alix-bo-3 between `alix.id` and `bo.id`. With DM stitching, these two conversations display as one conversation. | ||
|
|
||
| Therefore, when subscribing a DM conversations to push notifications, you should subscribe to a list of topics because every DM conversation can potentially have multiple topics. You will miss push notifications for messages if you are not listening to every potential topic for a DM conversation that messages could potentially be sent on. | ||
| - They have two different conversation IDs, and thus two different topics. | ||
|
|
||
| For example, you must consider that with DM stitching, the conversation is moving from alix-bo-1 and alix-bo-3, for example, and [resubscribe appropriately](/chat-apps/push-notifs/push-notifs#resubscribe-to-topics-to-get-new-hmac-keys). | ||
| - When subscribing a DM conversation to push notifications, you should subscribe with a list of topics because every DM conversation can potentially have multiple topics. You will miss push notifications for messages if you are not listening to every potential topic for a DM conversation that messages could potentially be sent on. | ||
|
|
||
| Also, you must consider that a welcome message will be sent when a DM conversation is added to the stitched DMs, and you should not send a push for the welcome message because the user already has a conversation with the person. It is just a different DM conversation in the set of DM conversations that are stitched together. These welcome messages are filtered out of streams, but they are not filtered out for the XMTP push notification server, so you must handle these duplicate DM welcomes at the push notification service. | ||
| - While a DM conversation can have multiple topics, each individual message is sent to only one topic. This means you will receive only one push notification per message, not multiple notifications for the same message. Subscribing to all topics just ensures you don't miss a message, regardless of which topic it's sent on. | ||
|
|
||
| - A welcome message will be sent when a DM conversation is added to the stitched DMs, and you should not send a push for the welcome message because the user already has a conversation with the person. It is just a different DM conversation in the set of DM conversations that are stitched together. These welcome messages are filtered out of streams, but they are not filtered out for the XMTP push notification server, so you must handle these duplicate DM welcomes at the push notification service. | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add guidance about HOW to do this. For example, how can I know that when I got this push notification in the app, this is a new message, a new conversation, or an old one. Chat with Benny - he's been thinking about it from the context of agents, where this is a particular kind of pressing problem as well. Agents want to respond when they get invited to a new conversation. But then, if you have a second instance of the agent, they don't want that one to say, send everyone a, hey, good to meet you message. He probably has some ideas about how to detect this in push notification handlers as well. |
||
|
|
||
| - The conversation is moving from alix-bo-1 and alix-bo-3, for example, and you should [resubscribe appropriately](/chat-apps/push-notifs/push-notifs#resubscribe-to-topics-to-get-new-hmac-keys). | ||
Uh oh!
There was an error while loading. Please reload this page.