mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-27 12:55:11 +01:00
Allow deleting link preview when editing (#1087)
This commit is contained in:
parent
ea01d28496
commit
8036c0dc87
@ -404,11 +404,13 @@ export async function editMessage({
|
||||
message,
|
||||
text,
|
||||
entities,
|
||||
noWebPage,
|
||||
}: {
|
||||
chat: ApiChat;
|
||||
message: ApiMessage;
|
||||
text: string;
|
||||
entities?: ApiMessageEntity[];
|
||||
noWebPage?: boolean;
|
||||
}) {
|
||||
const isScheduled = message.date * 1000 > Date.now();
|
||||
const messageUpdate: Partial<ApiMessage> = {
|
||||
@ -441,6 +443,7 @@ export async function editMessage({
|
||||
peer: buildInputPeer(chat.id, chat.accessHash),
|
||||
id: message.id,
|
||||
...(isScheduled && { scheduleDate: message.date }),
|
||||
...(noWebPage && { noWebpage: noWebPage }),
|
||||
}), true);
|
||||
}
|
||||
|
||||
|
@ -258,7 +258,7 @@ addReducer('editMessage', (global, actions, payload) => {
|
||||
}
|
||||
|
||||
void callApi('editMessage', {
|
||||
chat, message, text, entities,
|
||||
chat, message, text, entities, noWebPage: selectNoWebPage(global, chatId, threadId),
|
||||
});
|
||||
|
||||
actions.setEditingId({ messageId: undefined });
|
||||
|
Loading…
Reference in New Issue
Block a user