fix: change mentionedIds type from ChatId[] to string[] in Message (#3581)

* fix: change mentionedIds type from ChatId[] to string[] in Message interface

* fix: correct types for mentionedIds and groupMentions

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
Yusif Aliyev 2025-06-02 22:05:18 +04:00 • committed by GitHub
commit 94ce20b4a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 18 deletions

8
index.d.ts vendored
View file

@ -991,15 +991,11 @@ declare namespace WAWebJS {
/** MediaKey that represents the sticker 'ID' */ /** MediaKey that represents the sticker 'ID' */
mediaKey?: string, mediaKey?: string,
/** Indicates the mentions in the message body. */ /** Indicates the mentions in the message body. */
mentionedIds: ChatId[], mentionedIds: string[],
/** Indicates whether there are group mentions in the message body */ /** Indicates whether there are group mentions in the message body */
groupMentions: { groupMentions: {
groupSubject: string; groupSubject: string;
groupJid: { groupJid: string;
server: string;
user: string;
_serialized: string;
};
}[], }[],
/** Unix timestamp for when the message was created */ /** Unix timestamp for when the message was created */
timestamp: number, timestamp: number,

View file

@ -186,26 +186,16 @@ class Message extends Base {
toId: typeof data.to === 'object' && '_serialized' in data.to ? data.to._serialized : data.to toId: typeof data.to === 'object' && '_serialized' in data.to ? data.to._serialized : data.to
} : undefined; } : undefined;
/**
* @typedef {Object} Mention
* @property {string} server
* @property {string} user
* @property {string} _serialized
*/
/** /**
* Indicates the mentions in the message body. * Indicates the mentions in the message body.
* @type {Mention[]} * @type {string[]}
*/ */
this.mentionedIds = data.mentionedJidList || []; this.mentionedIds = data.mentionedJidList || [];
/** /**
* @typedef {Object} GroupMention * @typedef {Object} GroupMention
* @property {string} groupSubject The name of the group * @property {string} groupSubject The name of the group
* @property {Object} groupJid The group ID * @property {string} groupJid The group ID
* @property {string} groupJid.server
* @property {string} groupJid.user
* @property {string} groupJid._serialized
*/ */
/** /**