Merge pull request #1125 from fmorett/patch-1

fix cannot read null of mentioned
This commit is contained in:
Davidson Gomes 2025-01-06 12:18:56 -03:00 committed by GitHub
commit 6212ee3eb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2131,7 +2131,7 @@ export class BaileysStartupService extends ChannelStartupService {
if (options?.mentionsEveryOne) { if (options?.mentionsEveryOne) {
mentions = group.participants.map((participant) => participant.id); mentions = group.participants.map((participant) => participant.id);
} else if (options.mentioned?.length) { } else if (options?.mentioned?.length) {
mentions = options.mentioned.map((mention) => { mentions = options.mentioned.map((mention) => {
const jid = this.createJid(mention); const jid = this.createJid(mention);
if (isJidGroup(jid)) { if (isJidGroup(jid)) {