-
Notifications
You must be signed in to change notification settings - Fork 20
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
Bug streaming groups multi client #496
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 | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -146,7 +146,7 @@ export default class Conversations< | |||||||||||||||||||||||||||||||||||||
const groupsSubscription = XMTPModule.emitter.addListener( | ||||||||||||||||||||||||||||||||||||||
EventTypes.Group, | ||||||||||||||||||||||||||||||||||||||
async ({ inboxId, group }: { inboxId: string; group: GroupParams }) => { | ||||||||||||||||||||||||||||||||||||||
if (this.known[group.id]) { | ||||||||||||||||||||||||||||||||||||||
if (this.known[group.id] || this.client.inboxId !== inboxId) { | ||||||||||||||||||||||||||||||||||||||
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. I think this is a good fix to merge now. long term, I wonder if it would be a worthwhile performance gain to programmatically generate these Expo Module events to include the inbox-id in their name, so we dont send copies of all clients' events to each client event listener and then need to filter them out. xmtp-react-native/android/src/main/java/expo/modules/xmtpreactnativesdk/XMTPModule.kt Lines 214 to 231 in 0834182
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. I looked into that and it didn't seem straight forward. But something we should consider looking into again for sure. |
||||||||||||||||||||||||||||||||||||||
return | ||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||
this.known[group.id] = true | ||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nmalzieu I think this fix also fixed this weird bug? Can you confirm?