mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-24 17:38:40 -06:00
fix: optimize send message from group with mentions
This commit is contained in:
parent
a7b05f1e85
commit
be492a3e3f
@ -1434,9 +1434,6 @@ export class WAStartupService {
|
|||||||
let mentions: string[];
|
let mentions: string[];
|
||||||
if (isJidGroup(sender)) {
|
if (isJidGroup(sender)) {
|
||||||
try {
|
try {
|
||||||
this.logger.verbose('Getting group metadata');
|
|
||||||
const groupMetadata = await this.client.groupMetadata(sender);
|
|
||||||
|
|
||||||
if (options?.mentions) {
|
if (options?.mentions) {
|
||||||
this.logger.verbose('Mentions defined');
|
this.logger.verbose('Mentions defined');
|
||||||
|
|
||||||
@ -1450,6 +1447,8 @@ export class WAStartupService {
|
|||||||
if (options.mentions.everyOne) {
|
if (options.mentions.everyOne) {
|
||||||
this.logger.verbose('Mentions everyone');
|
this.logger.verbose('Mentions everyone');
|
||||||
|
|
||||||
|
this.logger.verbose('Getting group metadata');
|
||||||
|
const groupMetadata = await this.client.groupMetadata(sender);
|
||||||
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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user