Browse Source

Fix opening channel avatar

master
Eduard Kuzmenko 3 years ago
parent
commit
f7fd6832eb
  1. 4
      .env
  2. 7
      src/lib/appManagers/appMessagesManager.ts

4
.env

@ -1,5 +1,5 @@
API_ID=1025907 API_ID=1025907
API_HASH=452b0359b988148995f22ff0f4229750 API_HASH=452b0359b988148995f22ff0f4229750
VERSION=1.2.0 VERSION=1.2.0
VERSION_FULL=1.2.0 (118) VERSION_FULL=1.2.0 (119)
BUILD=118 BUILD=119

7
src/lib/appManagers/appMessagesManager.ts

@ -1635,17 +1635,20 @@ export class AppMessagesManager {
public generateFakeAvatarMessage(peerId: PeerId, photo: Photo) { public generateFakeAvatarMessage(peerId: PeerId, photo: Photo) {
const maxId = Number.MAX_SAFE_INTEGER; const maxId = Number.MAX_SAFE_INTEGER;
const message = { const message: Message.messageService = {
_: 'messageService', _: 'messageService',
pFlags: {},
action: { action: {
_: 'messageActionChannelEditPhoto', _: 'messageActionChannelEditPhoto',
photo photo
}, },
id: maxId,
peer_id: appPeersManager.getOutputPeer(peerId),
mid: maxId, mid: maxId,
peerId, peerId,
date: (photo as Photo.photo).date, date: (photo as Photo.photo).date,
fromId: peerId fromId: peerId
} as Message.messageService; };
this.getMessagesStorage(peerId).set(maxId, message); this.getMessagesStorage(peerId).set(maxId, message);
return message; return message;

Loading…
Cancel
Save