Fix deleting messages sent as channel

This commit is contained in:
Eduard Kuzmenko 2022-02-22 14:03:19 +02:00
parent 892aab8a49
commit de278c35c7

View File

@ -3561,7 +3561,7 @@ export class AppMessagesManager {
public canDeleteMessage(message: MyMessage) {
return message && (
message.peerId.isUser()
|| message.fromId === rootScope.myId
|| message.pFlags.out
|| appChatsManager.getChat(message.peerId.toChatId())._ === 'chat'
|| appChatsManager.hasRights(message.peerId.toChatId(), 'delete_messages')
) && !message.pFlags.is_outgoing;