Skip to content

[FIX] Livechat rooms starting with two unread message counter#11834

Merged
sampaiodiego merged 1 commit intodevelopfrom
fix-start-livechat-room-without-msgs-count
Aug 20, 2018
Merged

[FIX] Livechat rooms starting with two unread message counter#11834
sampaiodiego merged 1 commit intodevelopfrom
fix-start-livechat-room-without-msgs-count

Conversation

@renatobecker-zz
Copy link
Copy Markdown

we are creating Livechat rooms with the prop msgs: 1, but testing the PR related to Livechat analytics I noticed that after creating a room, the message count was 2 instead of 1.
This is happening because even the room is created when a visitor starts the chat by sending a message, we have the afterSaveMessage callback where the RocketChat.models.Rooms.incMsgCountById is called, so the number of room messages will be duplicated.

@sampaiodiego sampaiodiego changed the title [FIX] Start Livechat room with empty message count [FIX] Livechat rooms starting with two unread message counter Aug 20, 2018
@sampaiodiego sampaiodiego merged commit 277ab2e into develop Aug 20, 2018
@sampaiodiego sampaiodiego deleted the fix-start-livechat-room-without-msgs-count branch August 20, 2018 23:17
@sampaiodiego sampaiodiego mentioned this pull request Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants