mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 12:09:21 +00:00
Auto-close conversation chat on user removal
This commit is contained in:
parent
ce0397d5be
commit
2e1dc48671
@ -1486,3 +1486,17 @@ document.addEventListener("deletedConvMessage", (e) => {
|
||||
|
||||
target.style.display = "none";
|
||||
})
|
||||
|
||||
|
||||
// Register to conversation removal
|
||||
document.addEventListener("removedUserFromConv", e => {
|
||||
const msg = e.detail;
|
||||
|
||||
if (msg.user_id != userID())
|
||||
return;
|
||||
|
||||
if(!ConvService.__serviceCache.hasOwnProperty("conversation-" + msg.conv_id))
|
||||
return;
|
||||
|
||||
ConvChatWindow.__conversationsCache["conversation-"+msg.conv_id].box.closeFunction();
|
||||
});
|
Loading…
Reference in New Issue
Block a user