mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 05:49:22 +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);
|
SendEvent("deletedConvMessage", msg.data.id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "removed_user_from_conv":
|
||||||
|
SendEvent("removedUserFromConv", msg.data);
|
||||||
|
break;
|
||||||
|
|
||||||
case "new_comment":
|
case "new_comment":
|
||||||
SendEvent("new_comment", msg.data);
|
SendEvent("new_comment", msg.data);
|
||||||
break;
|
break;
|
||||||
|
@ -686,3 +686,11 @@ document.addEventListener("deletedConvMessage", (e) => {
|
|||||||
|
|
||||||
target.parentNode.remove()
|
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