fix: Fixed bug when send message when dont have mentionsEveryOne on payload

This commit is contained in:
Davidson Gomes 2024-10-04 18:33:01 -03:00
parent 01ae55f02a
commit fcfa96d97d

View File

@ -1914,7 +1914,7 @@ export class BaileysStartupService extends ChannelStartupService {
throw new NotFoundException('Group not found');
}
if (options.mentionsEveryOne) {
if (options?.mentionsEveryOne) {
mentions = group.participants.map((participant) => participant.id);
} else if (options.mentioned?.length) {
mentions = options.mentioned.map((mention) => {