-
Notifications
You must be signed in to change notification settings - Fork 38
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
same message is sent multiple times to the receiver #49
Comments
@keanyee Do you add the listener multiple times, for example by writing the add listener to the build method? |
@dujiepeng only once.
the onMessagesReceived function is from the flutter example . |
@keanyee |
Add below line in dispose method. ChatClient.getInstance.chatManager.clearEventHandlers(); |
Same message was sent multiple times to the receiver (userId 1) from sender (userId 1) even though the sender only sent it once.
You can see the local time and server time are all the same for the message.
I/flutter (30685): {from: 2, to: 1, body: {type: txt, content: u, translations: {}}, direction: rec, hasRead: false, hasReadAck: false, hasDeliverAck: false, needGroupAck: false, msgId: 1063987074572487632, conversationId: 2, chatType: 0, localTime: 1665293596977, serverTime: 1665293595422, status: 2, isThread: false}
I/flutter (30685): {from: 2, to: 1, body: {type: txt, content: u, translations: {}}, direction: rec, hasRead: false, hasReadAck: false, hasDeliverAck: false, needGroupAck: false, msgId: 1063987074572487632, conversationId: 2, chatType: 0, localTime: 1665293596977, serverTime: 1665293595422, status: 2, isThread: false}
I/flutter (30685): {from: 2, to: 1, body: {type: txt, content: u, translations: {}}, direction: rec, hasRead: false, hasReadAck: false, hasDeliverAck: false, needGroupAck: false, msgId: 1063987074572487632, conversationId: 2, chatType: 0, localTime: 1665293596977, serverTime: 1665293595422, status: 2, isThread: false}
I/flutter (30685): {from: 2, to: 1, body: {type: txt, content: u, translations: {}}, direction: rec, hasRead: false, hasReadAck: false, hasDeliverAck: false, needGroupAck: false, msgId: 1063987074572487632, conversationId: 2, chatType: 0, localTime: 1665293596977, serverTime: 1665293595422, status: 2, isThread: false}
I/flutter (30685): {from: 2, to: 1, body: {type: txt, content: u, translations: {}}, direction: rec, hasRead: false, hasReadAck: false, hasDeliverAck: false, needGroupAck: false, msgId: 1063987074572487632, conversationId: 2, chatType: 0, localTime: 1665293596977, serverTime: 1665293595422, status: 2, isThread: false}
I/flutter (30685): {from: 2, to: 1, body: {type: txt, content: u, translations: {}}, direction: rec, hasRead: false, hasReadAck: false, hasDeliverAck: false, needGroupAck: false, msgId: 1063987074572487632, conversationId: 2, chatType: 0, localTime: 1665293596977, serverTime: 1665293595422, status: 2, isThread: false}
The text was updated successfully, but these errors were encountered: