mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-27 04:45:08 +01:00
Service Notifications: Fix loading media
This commit is contained in:
parent
9f7f01b0bd
commit
14b603991f
@ -632,6 +632,7 @@ addActionHandler('createServiceNotification', (global, actions, payload) => {
|
|||||||
// The fractional ID is made of the largest integer ID and an incremented fractional part
|
// The fractional ID is made of the largest integer ID and an incremented fractional part
|
||||||
const id = Math.floor(maxId) + fractionalPart;
|
const id = Math.floor(maxId) + fractionalPart;
|
||||||
|
|
||||||
|
message.previousLocalId = message.id;
|
||||||
message.id = id;
|
message.id = id;
|
||||||
|
|
||||||
const serviceNotification = {
|
const serviceNotification = {
|
||||||
|
@ -23,9 +23,9 @@ export function getMessageHtmlId(messageId: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getMessageKey(message: ApiMessage): MessageKey {
|
export function getMessageKey(message: ApiMessage): MessageKey {
|
||||||
const { chatId, id } = message;
|
const { chatId, id, previousLocalId } = message;
|
||||||
|
|
||||||
return buildMessageKey(chatId, id);
|
return buildMessageKey(chatId, isServiceNotificationMessage(message) ? previousLocalId || id : id);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function buildMessageKey(chatId: string, msgId: number): MessageKey {
|
export function buildMessageKey(chatId: string, msgId: number): MessageKey {
|
||||||
|
Loading…
Reference in New Issue
Block a user