From f7fd6832eb98c7331b2891af5e3b167a677f5048 Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Sun, 27 Feb 2022 21:21:21 +0200 Subject: [PATCH] Fix opening channel avatar --- .env | 4 ++-- src/lib/appManagers/appMessagesManager.ts | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.env b/.env index 8ad92594..9da2a3a5 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ API_ID=1025907 API_HASH=452b0359b988148995f22ff0f4229750 VERSION=1.2.0 -VERSION_FULL=1.2.0 (118) -BUILD=118 +VERSION_FULL=1.2.0 (119) +BUILD=119 diff --git a/src/lib/appManagers/appMessagesManager.ts b/src/lib/appManagers/appMessagesManager.ts index 8cf28ac8..3ce15b77 100644 --- a/src/lib/appManagers/appMessagesManager.ts +++ b/src/lib/appManagers/appMessagesManager.ts @@ -1635,17 +1635,20 @@ export class AppMessagesManager { public generateFakeAvatarMessage(peerId: PeerId, photo: Photo) { const maxId = Number.MAX_SAFE_INTEGER; - const message = { + const message: Message.messageService = { _: 'messageService', + pFlags: {}, action: { _: 'messageActionChannelEditPhoto', photo }, + id: maxId, + peer_id: appPeersManager.getOutputPeer(peerId), mid: maxId, peerId, date: (photo as Photo.photo).date, fromId: peerId - } as Message.messageService; + }; this.getMessagesStorage(peerId).set(maxId, message); return message;