diff --git a/gramjs/client/messages.ts b/gramjs/client/messages.ts index d49a5e0c..d539c0da 100644 --- a/gramjs/client/messages.ts +++ b/gramjs/client/messages.ts @@ -1175,7 +1175,8 @@ export async function getCommentData( msgId: utils.getMessageId(message), }) ); - const relevantMessage = result.messages[0]; + const relevantMessage = result.messages + .reduce((p: Api.TypeMessage, c: Api.TypeMessage) => (p && p.id < c.id ? p : c)); let chat; for (const c of result.chats) { if (