mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
fix: Fixed mentions
Fixed mentions
This commit is contained in:
commit
3d8e6f4394
@ -1686,20 +1686,13 @@ export class WAStartupService {
|
|||||||
if (options?.mentions) {
|
if (options?.mentions) {
|
||||||
this.logger.verbose('Mentions defined');
|
this.logger.verbose('Mentions defined');
|
||||||
|
|
||||||
if (
|
if (options.mentions?.everyOne) {
|
||||||
!Array.isArray(options.mentions.mentioned) &&
|
|
||||||
!options.mentions.everyOne
|
|
||||||
) {
|
|
||||||
throw new BadRequestException('Mentions must be an array');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.mentions.everyOne) {
|
|
||||||
this.logger.verbose('Mentions everyone');
|
this.logger.verbose('Mentions everyone');
|
||||||
|
|
||||||
this.logger.verbose('Getting group metadata');
|
this.logger.verbose('Getting group metadata');
|
||||||
mentions = groupMetadata.participants.map((participant) => participant.id);
|
mentions = groupMetadata.participants.map((participant) => participant.id);
|
||||||
this.logger.verbose('Getting group metadata for mentions');
|
this.logger.verbose('Getting group metadata for mentions');
|
||||||
} else {
|
} else if(options.mentions?.mentioned?.length) {
|
||||||
this.logger.verbose('Mentions manually defined');
|
this.logger.verbose('Mentions manually defined');
|
||||||
mentions = options.mentions.mentioned.map((mention) => {
|
mentions = options.mentions.mentioned.map((mention) => {
|
||||||
const jid = this.createJid(mention);
|
const jid = this.createJid(mention);
|
||||||
|
Loading…
Reference in New Issue
Block a user