Skip to content

[FIX] Auto-hide LiveChat closed rooms#11291

Closed
renatobecker-zz wants to merge 3 commits intodevelopfrom
livechat-hide-closed-room
Closed

[FIX] Auto-hide LiveChat closed rooms#11291
renatobecker-zz wants to merge 3 commits intodevelopfrom
livechat-hide-closed-room

Conversation

@renatobecker-zz
Copy link

Closes #11118

Fixes the auto-hide when closing LiveChat rooms. Auto-hiding was not working as expect due to the sequence in which the subscriptions are updated:

Here:
https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/rocketchat-livechat/server/lib/Livechat.js#L252

And here:
https://github.com/RocketChat/Rocket.Chat/blob/develop/imports/message-read-receipt/server/hooks.js#L11

Now the RocketChat.models.Subscriptions.hideByRoomIdAndUserId is called in the livechat.closeRoom callback to avoid previous overwrite.

Improvement:
If the room is closed on the client-side(Livechat widget), an alert will be displayed to notify the agent:

screen shot 2018-06-28 at 17 25 07

@sampaiodiego
Copy link
Member

@renatobecker I saw the referenced issue is already closed. so does it still make sense? if so, can you please fix the conflicts?

@renatobecker-zz
Copy link
Author

Closed by #13824.

@sampaiodiego sampaiodiego deleted the livechat-hide-closed-room branch September 25, 2019 22:11
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.

Auto-hide livechat room on close

5 participants

Comments