ngx-chat icon indicating copy to clipboard operation
ngx-chat copied to clipboard

Prevent warning 'ChatService: message with id xxx already exists"

Open juergen83 opened this issue 4 years ago • 4 comments

Hi, how I can prevent the warning message "ChatService: message with id v0p8zlv7dra already exists" when I login and/or join into a room. If more and more messages loaded in the chat room then in the browser console appears more and more these warnings.

BR Juergen

juergen83 avatar Nov 16 '21 11:11 juergen83

@juergen83 we are working on this issue. It comes from not a full implementation of MAM.

But a pull request would be welcome for a log level setting.

CodeBast4rd avatar Nov 16 '21 12:11 CodeBast4rd

I thought that this issue comes from MAM. I'll see what can be done...

juergen83 avatar Nov 16 '21 12:11 juergen83

I really want to help you, but I don't have enough knowledge to change your code. I don't know where to place this log level setting.

juergen83 avatar Dec 17 '21 09:12 juergen83

After refactoring the whole code base. I still did not have the success to find out how this issue comes to be. Here is the line responsible for the warning: https://github.com/pazznetwork/ngx-chat/blob/master/libs/ngx-chat-shared/src/interface/message-store.ts#L31

In theory this should not happen as the server should now deliver multiple times the same message if not extra queried for it.

I will try to hunt down the error otherwise I will just remove the log.

CodeBast4rd avatar Apr 24 '23 17:04 CodeBast4rd