mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-14 10:09:07 +01:00
Message: Fix showing self-destructing videos
This commit is contained in:
parent
46754b9359
commit
577436d0b6
@ -212,6 +212,10 @@ export function buildMessageDraft(draft: GramJs.TypeDraftMessage) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function buildMessageMediaContent(media: GramJs.TypeMessageMedia): ApiMessage['content'] | undefined {
|
export function buildMessageMediaContent(media: GramJs.TypeMessageMedia): ApiMessage['content'] | undefined {
|
||||||
|
if ('ttlSeconds' in media && media.ttlSeconds) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
const sticker = buildSticker(media);
|
const sticker = buildSticker(media);
|
||||||
if (sticker) return { sticker };
|
if (sticker) return { sticker };
|
||||||
|
|
||||||
@ -278,10 +282,6 @@ function buildPhoto(media: GramJs.TypeMessageMedia): ApiPhoto | undefined {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (media.ttlSeconds) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
return buildApiPhoto(media.photo);
|
return buildApiPhoto(media.photo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -405,10 +405,6 @@ function buildDocumentFromMedia(media: GramJs.TypeMessageMedia) {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (media.ttlSeconds) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
return buildApiDocument(media.document);
|
return buildApiDocument(media.document);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user