fix(web): enforce channel read-only and admin delete rules

This commit is contained in:
2026-03-08 13:18:52 +03:00
parent 13b5f5b855
commit 18596e6dab
3 changed files with 28 additions and 10 deletions

View File

@@ -1025,6 +1025,9 @@ function canDeleteForEveryone(
if (chat.type === "channel") {
return chat.my_role === "owner" || chat.my_role === "admin";
}
if (chat.type === "group" && (chat.my_role === "owner" || chat.my_role === "admin")) {
return true;
}
return message.sender_id === meId;
}