Message: Fix applying some updates (#5625)
This commit is contained in:
parent
8a2f067c9b
commit
f8d0eb7311
@ -225,7 +225,7 @@ export function buildApiMessageWithChatId(
|
|||||||
|
|
||||||
const savedPeerId = mtpMessage.savedPeerId && getApiChatIdFromMtpPeer(mtpMessage.savedPeerId);
|
const savedPeerId = mtpMessage.savedPeerId && getApiChatIdFromMtpPeer(mtpMessage.savedPeerId);
|
||||||
|
|
||||||
return omitUndefined<ApiMessage>({
|
return {
|
||||||
id: mtpMessage.id,
|
id: mtpMessage.id,
|
||||||
chatId,
|
chatId,
|
||||||
isOutgoing,
|
isOutgoing,
|
||||||
@ -270,7 +270,7 @@ export function buildApiMessageWithChatId(
|
|||||||
isInvertedMedia,
|
isInvertedMedia,
|
||||||
isVideoProcessingPending,
|
isVideoProcessingPending,
|
||||||
reportDeliveryUntilDate: mtpMessage.reportDeliveryUntilDate,
|
reportDeliveryUntilDate: mtpMessage.reportDeliveryUntilDate,
|
||||||
});
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function buildMessageDraft(draft: GramJs.TypeDraftMessage): ApiDraft | undefined {
|
export function buildMessageDraft(draft: GramJs.TypeDraftMessage): ApiDraft | undefined {
|
||||||
|
|||||||
@ -21,7 +21,7 @@ import {
|
|||||||
import { areDeepEqual } from '../../util/areDeepEqual';
|
import { areDeepEqual } from '../../util/areDeepEqual';
|
||||||
import { getCurrentTabId } from '../../util/establishMultitabRole';
|
import { getCurrentTabId } from '../../util/establishMultitabRole';
|
||||||
import {
|
import {
|
||||||
areSortedArraysEqual, excludeSortedArray, omit, pick, pickTruthy, unique,
|
areSortedArraysEqual, excludeSortedArray, omit, omitUndefined, pick, pickTruthy, unique,
|
||||||
} from '../../util/iteratees';
|
} from '../../util/iteratees';
|
||||||
import { isLocalMessageId, type MessageKey } from '../../util/keys/messageKey';
|
import { isLocalMessageId, type MessageKey } from '../../util/keys/messageKey';
|
||||||
import {
|
import {
|
||||||
@ -273,11 +273,11 @@ export function updateChatMessage<T extends GlobalState>(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const updatedMessage = {
|
const updatedMessage = omitUndefined({
|
||||||
...message,
|
...message,
|
||||||
...messageUpdate,
|
...messageUpdate,
|
||||||
emojiOnlyCount,
|
emojiOnlyCount,
|
||||||
};
|
});
|
||||||
|
|
||||||
if (!updatedMessage.id) {
|
if (!updatedMessage.id) {
|
||||||
return global;
|
return global;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user