mirror of
https://github.com/danog/telegram-tt.git
synced 2025-01-22 05:11:55 +01:00
Round Video: Disable captions
This commit is contained in:
parent
f2510d9b65
commit
417941f5f3
@ -116,20 +116,7 @@ export function buildApiMessageFromNotification(
|
||||
currentDate: number,
|
||||
): ApiMessage {
|
||||
const localId = localMessageCounter++;
|
||||
let content: ApiMessage['content'] = {};
|
||||
|
||||
if (notification.media) {
|
||||
content = {
|
||||
...buildMessageMediaContent(notification.media),
|
||||
};
|
||||
}
|
||||
|
||||
if (notification.message && !content.sticker && !content.poll && !content.contact) {
|
||||
content = {
|
||||
...content,
|
||||
text: buildMessageTextContent(notification.message, notification.entities),
|
||||
};
|
||||
}
|
||||
const content = buildMessageContent(notification);
|
||||
|
||||
return {
|
||||
id: localId,
|
||||
@ -154,22 +141,7 @@ export function buildApiMessageWithChatId(chatId: string, mtpMessage: UniversalM
|
||||
const peerId = mtpMessage.peerId ? getApiChatIdFromMtpPeer(mtpMessage.peerId) : undefined;
|
||||
const isChatWithSelf = !fromId && chatId === currentUserId;
|
||||
const isOutgoing = (mtpMessage.out && !mtpMessage.post) || (isChatWithSelf && !mtpMessage.fwdFrom);
|
||||
|
||||
let content: ApiMessage['content'] = {};
|
||||
|
||||
if (mtpMessage.media) {
|
||||
content = {
|
||||
...buildMessageMediaContent(mtpMessage.media),
|
||||
};
|
||||
}
|
||||
|
||||
if (mtpMessage.message && !content.sticker && !content.poll && !content.contact) {
|
||||
content = {
|
||||
...content,
|
||||
text: buildMessageTextContent(mtpMessage.message, mtpMessage.entities),
|
||||
};
|
||||
}
|
||||
|
||||
const content = buildMessageContent(mtpMessage);
|
||||
const action = mtpMessage.action
|
||||
&& buildAction(mtpMessage.action, fromId, peerId, Boolean(mtpMessage.post), isOutgoing);
|
||||
if (action) {
|
||||
@ -267,6 +239,27 @@ export function buildApiAvailableReaction(availableReaction: GramJs.AvailableRea
|
||||
};
|
||||
}
|
||||
|
||||
export function buildMessageContent(
|
||||
mtpMessage: UniversalMessage | GramJs.UpdateServiceNotification,
|
||||
) {
|
||||
let content: ApiMessage['content'] = {};
|
||||
|
||||
if (mtpMessage.media) {
|
||||
content = {
|
||||
...buildMessageMediaContent(mtpMessage.media),
|
||||
};
|
||||
}
|
||||
|
||||
if (mtpMessage.message && !content.sticker && !content.poll && !content.contact && !(content.video?.isRound)) {
|
||||
content = {
|
||||
...content,
|
||||
text: buildMessageTextContent(mtpMessage.message, mtpMessage.entities),
|
||||
};
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
export function buildMessageTextContent(
|
||||
message: string,
|
||||
entities?: GramJs.TypeMessageEntity[],
|
||||
|
@ -576,7 +576,6 @@
|
||||
|
||||
.message-content.custom-shape {
|
||||
line-height: 1.2;
|
||||
font-size: 10rem;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-end;
|
||||
|
Loading…
x
Reference in New Issue
Block a user