From 7775ff4eaa4b897c4f23409131779effdde4cd3f Mon Sep 17 00:00:00 2001 From: teidesu <86301490+teidesu@users.noreply.github.com> Date: Sun, 25 Jul 2021 21:01:38 +0300 Subject: [PATCH] feat(client): replyToThreadId field for Message --- packages/client/src/types/messages/message.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/client/src/types/messages/message.ts b/packages/client/src/types/messages/message.ts index 071fec8e..13c3d0d8 100644 --- a/packages/client/src/types/messages/message.ts +++ b/packages/client/src/types/messages/message.ts @@ -348,6 +348,14 @@ export class Message { return this.raw.replyTo?.replyToMsgId ?? null } + /** + * For replies, ID of the thread (i.e. ID of the top message + * in the thread) + */ + get replyToThreadId(): number | null { + return this.raw.replyTo?.replyToTopId ?? null + } + /** * Whether this message contains mention of the current user */