Comments: Fix wrong thread info on forwards (#6962)
This commit is contained in:
parent
6a8ca9b97b
commit
a103f09dae
@ -801,7 +801,11 @@ export function buildApiThreadInfo(
|
|||||||
channelId, replies, maxId = messageId, recentRepliers, comments, readMaxId,
|
channelId, replies, maxId = messageId, recentRepliers, comments, readMaxId,
|
||||||
} = messageReplies;
|
} = messageReplies;
|
||||||
|
|
||||||
const { fromId, channelPost } = messageForwardInfo || {};
|
const {
|
||||||
|
fromId, channelPost, savedFromPeer, savedFromMsgId,
|
||||||
|
} = messageForwardInfo || {};
|
||||||
|
const fromChannelPeer = savedFromPeer || fromId;
|
||||||
|
const fromMessageId = savedFromMsgId || channelPost;
|
||||||
|
|
||||||
const apiChannelId = channelId ? buildApiPeerId(channelId, 'channel') : undefined;
|
const apiChannelId = channelId ? buildApiPeerId(channelId, 'channel') : undefined;
|
||||||
if (apiChannelId === DELETED_COMMENTS_CHANNEL_ID) {
|
if (apiChannelId === DELETED_COMMENTS_CHANNEL_ID) {
|
||||||
@ -830,8 +834,8 @@ export function buildApiThreadInfo(
|
|||||||
isCommentsInfo: false,
|
isCommentsInfo: false,
|
||||||
chatId,
|
chatId,
|
||||||
threadId: messageId,
|
threadId: messageId,
|
||||||
fromChannelId: fromId && channelPost ? getApiChatIdFromMtpPeer(fromId) : undefined,
|
fromChannelId: fromChannelPeer && fromMessageId ? getApiChatIdFromMtpPeer(fromChannelPeer) : undefined,
|
||||||
fromMessageId: channelPost,
|
fromMessageId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user