mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 12:09:21 +00:00
Redirect user when he is removed from conversation
This commit is contained in:
parent
865a123897
commit
ce0397d5be
@ -209,6 +209,10 @@ class UserWebSocket {
|
||||
SendEvent("deletedConvMessage", msg.data.id);
|
||||
break;
|
||||
|
||||
case "removed_user_from_conv":
|
||||
SendEvent("removedUserFromConv", msg.data);
|
||||
break;
|
||||
|
||||
case "new_comment":
|
||||
SendEvent("new_comment", msg.data);
|
||||
break;
|
||||
|
@ -685,4 +685,12 @@ document.addEventListener("deletedConvMessage", (e) => {
|
||||
return;
|
||||
|
||||
target.parentNode.remove()
|
||||
})
|
||||
})
|
||||
|
||||
// Register to conversation removal
|
||||
document.addEventListener("removedUserFromConv", e => {
|
||||
const msg = e.detail;
|
||||
|
||||
if (msg.user_id == userID() && ConversationPageConvPart._conv_info.id)
|
||||
Page.openPage("conversations");
|
||||
});
|
Loading…
Reference in New Issue
Block a user