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);
|
||||
|
||||
return omitUndefined<ApiMessage>({
|
||||
return {
|
||||
id: mtpMessage.id,
|
||||
chatId,
|
||||
isOutgoing,
|
||||
@ -270,7 +270,7 @@ export function buildApiMessageWithChatId(
|
||||
isInvertedMedia,
|
||||
isVideoProcessingPending,
|
||||
reportDeliveryUntilDate: mtpMessage.reportDeliveryUntilDate,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export function buildMessageDraft(draft: GramJs.TypeDraftMessage): ApiDraft | undefined {
|
||||
|
||||
@ -21,7 +21,7 @@ import {
|
||||
import { areDeepEqual } from '../../util/areDeepEqual';
|
||||
import { getCurrentTabId } from '../../util/establishMultitabRole';
|
||||
import {
|
||||
areSortedArraysEqual, excludeSortedArray, omit, pick, pickTruthy, unique,
|
||||
areSortedArraysEqual, excludeSortedArray, omit, omitUndefined, pick, pickTruthy, unique,
|
||||
} from '../../util/iteratees';
|
||||
import { isLocalMessageId, type MessageKey } from '../../util/keys/messageKey';
|
||||
import {
|
||||
@ -273,11 +273,11 @@ export function updateChatMessage<T extends GlobalState>(
|
||||
);
|
||||
}
|
||||
|
||||
const updatedMessage = {
|
||||
const updatedMessage = omitUndefined({
|
||||
...message,
|
||||
...messageUpdate,
|
||||
emojiOnlyCount,
|
||||
};
|
||||
});
|
||||
|
||||
if (!updatedMessage.id) {
|
||||
return global;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user