Closed ciamalaeaskan closed 3 years ago
Hi, @ciamalaeaskan
Is the issue reproduce on our Sample Chat (w/o your modifications)? Or is it in your code?
A logs will be helpful.
Yes this issue is our Sample Chat code only.
OK. We will check to find the issue and fix. Are there any special steps to reproduce or the problem always present?
No its not on all time. I think its happen when both sender or receiver open chat at a time or open chat with multiple devices. But not sure about this scenario. Can you please give me a solution ASAP ?
And also I want to confirm that this will persist when user is logged in via browser version and Mobile at a time ?
No its not on all time. I think its happen when both sender or receiver open chat at a time or open chat with multiple devices. But not sure about this scenario. Can you please give me a solution ASAP ?
Please show your logs. We have to check the duplicate issue there. Or provide steps to reproduce for the issue.
And also I want to confirm that this will persist when user is logged in via browser version and Mobile at a time ?
You will get messages from the same user. Compare users' IDs to know that you've received the message from the same user.
Please show your logs. We have to check the duplicate issue there. Or provide steps to reproduce for the issue.
This is happend when both sender and receiver open and chat each other at a time. And also if the user logged in multiple devices also its happend
And also please confirm duplicate issue will persist also if the sender and receiver chat from browser and app respectively.
Message duplication scenario :
Thanks We will check it and let you know
Hi, @ccvlad
This issue is only pending from our end, Any update on this please?
Hi @ciamalaeaskan I have tested our Sample RNChat (user-A and user-B) with Sample Web Chat (User-A) by your steps and have not reproduced the issue with duplicate. Could you provide log from device where the problem exists?
No, for now we are not using web chat. We are having this issue only on Sample RNChat on the real device when chatting each other at the same time.
I am not asking you for logs from webapp. You are able to copy logs from the RNChat and paste here (via Metro Bundler / Android Studio / Chrome Debuger)
Now i have attached log file with the demo to reproduce this issue. Please refer the below zip file.
Now i have attached log file with the demo to reproduce this issue. Please refer the below zip file.
Uploading Archive.zip…
It is empty:
Please check it now
A user receives a forwarded message from the same user and it is normal. You can check incoming message by ID and display it if doesn't exist.
...
// init onMessageListener
ConnectyCube.chat.onMessageListener = this.onMessage;
...
const isMessageExistById = msgId => {
return messages.some(msg => msg.id === msgId); // messages - list of all current chat's messages
}
const displayMessage = msg => {
// here a code to display
}
const sendMessage = (dialogJidOrUserId, msg) => {
const messageId = ConnectyCube.chat.send(dialogJidOrUserId, msg);
this.displayMessage(msg);
return messageId;
}
const onMessage = (senderId, msg) => {
// use for some more conditions:
// const isPrivateMessage = msg.type === 'chat';
// const isGroupMessage = msg.type === 'groupchat';
// const isSelfUser = currentUserId === senderId;
const isMessageExist = this.isMessageExistById(msg.id)
if (!isMessageExist) {
this.displayMessage(msg);
}
...
FYI:
Message gets duplicates , so many bugs of sample RNChat project !!!!! When you close app without seeing the received messages ,then when you open again ,you will see double double messages of the last unseen messages.
Hi,
I have an issue on message sending process. When i send a message it get duplicates multiple times. Can you please help me to find out why this is happend ?
Please refer the below screenshot.
Thanks.![image_2020_10_20T04_54_08_271Z](https://user-images.githubusercontent.com/54099216/96541834-7b7fee80-12be-11eb-933e-2552481c9d47.png)