-
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
Conversation
Does not reproduce in Android proper. Only reproduces in iOS and Android inside of ReactNative. Makes me think it's an event listener issue. |
All the other methods already had this check so everything should work now. 🙏 |
} | ||
|
||
return 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?
@@ -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 comment
The 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
Events( | |
// Auth | |
"sign", | |
"authed", | |
"preCreateIdentityCallback", | |
"preEnableIdentityCallback", | |
"preAuthenticateToInboxCallback", | |
// Conversations | |
"conversation", | |
"group", | |
"conversationContainer", | |
"message", | |
"allGroupMessage", | |
// Conversation | |
"conversationMessage", | |
// Group | |
"groupMessage", | |
) |
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.
I looked into that and it didn't seem straight forward. But something we should consider looking into again for sure.
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.
nice fix! 🚢
🎉 This PR is included in version 2.5.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fixes #495