diff --git a/src/global/actions/apiUpdaters/messages.ts b/src/global/actions/apiUpdaters/messages.ts index 5eb1386f..e229e4c8 100644 --- a/src/global/actions/apiUpdaters/messages.ts +++ b/src/global/actions/apiUpdaters/messages.ts @@ -47,7 +47,7 @@ import { selectLocalAnimatedEmoji, } from '../../selectors'; import { - getMessageContent, isUserId, isMessageLocal, getMessageText, checkIfHasUnreadReactions, getMessageOriginalId, + getMessageContent, isUserId, isMessageLocal, getMessageText, checkIfHasUnreadReactions, } from '../../helpers'; import { onTickEnd } from '../../../util/schedulers'; import { updateUnreadReactions } from '../../reducers/reactions'; @@ -665,7 +665,7 @@ function updateChatLastMessage( if (currentLastMessage && !force) { const isSameOrNewer = ( - currentLastMessage.id === getMessageOriginalId(message) + currentLastMessage.id === message.id || currentLastMessage.id === message.previousLocalId ) || message.id > currentLastMessage.id; if (!isSameOrNewer) { diff --git a/src/global/selectors/messages.ts b/src/global/selectors/messages.ts index 0262fdab..ca7992e5 100644 --- a/src/global/selectors/messages.ts +++ b/src/global/selectors/messages.ts @@ -311,7 +311,7 @@ export function selectFocusedMessageId(global: GlobalState, chatId: string) { export function selectIsMessageFocused(global: GlobalState, message: ApiMessage) { const focusedId = selectFocusedMessageId(global, message.chatId); - return focusedId ? focusedId === getMessageOriginalId(message) : false; + return focusedId ? focusedId === message.id || focusedId === message.previousLocalId : false; } export function selectIsMessageUnread(global: GlobalState, message: ApiMessage) {