mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-21 11:37:23 -06:00
fix: Fixed ghost mentions in send text message
This commit is contained in:
parent
a2448ea4c1
commit
71a3e75ae2
@ -15,6 +15,7 @@
|
|||||||
* Added group membership validation before sending message to groups
|
* Added group membership validation before sending message to groups
|
||||||
* Adjusts in Dockerfile
|
* Adjusts in Dockerfile
|
||||||
* Adjusts in returns in endpoints chatwoot and webhook
|
* Adjusts in returns in endpoints chatwoot and webhook
|
||||||
|
* Fixed ghost mentions in send text message
|
||||||
|
|
||||||
# 1.2.2 (2023-07-15 09:36)
|
# 1.2.2 (2023-07-15 09:36)
|
||||||
|
|
||||||
|
@ -343,6 +343,7 @@ export class WAStartupService {
|
|||||||
public async sendDataWebhook<T = any>(event: Events, data: T, local = true) {
|
public async sendDataWebhook<T = any>(event: Events, data: T, local = true) {
|
||||||
const webhookGlobal = this.configService.get<Webhook>('WEBHOOK');
|
const webhookGlobal = this.configService.get<Webhook>('WEBHOOK');
|
||||||
const webhookLocal = this.localWebhook.events;
|
const webhookLocal = this.localWebhook.events;
|
||||||
|
const serverUrl = this.configService.get<HttpServer>('SERVER').URL;
|
||||||
const we = event.replace(/[\.-]/gm, '_').toUpperCase();
|
const we = event.replace(/[\.-]/gm, '_').toUpperCase();
|
||||||
const transformedWe = we.replace(/_/gm, '-').toLowerCase();
|
const transformedWe = we.replace(/_/gm, '-').toLowerCase();
|
||||||
const instance = this.configService.get<Auth>('AUTHENTICATION').INSTANCE;
|
const instance = this.configService.get<Auth>('AUTHENTICATION').INSTANCE;
|
||||||
@ -366,6 +367,7 @@ export class WAStartupService {
|
|||||||
instance: this.instance.name,
|
instance: this.instance.name,
|
||||||
data,
|
data,
|
||||||
destination: this.localWebhook.url,
|
destination: this.localWebhook.url,
|
||||||
|
server_url: serverUrl,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -377,6 +379,7 @@ export class WAStartupService {
|
|||||||
instance: this.instance.name,
|
instance: this.instance.name,
|
||||||
data,
|
data,
|
||||||
destination: this.localWebhook.url,
|
destination: this.localWebhook.url,
|
||||||
|
server_url: serverUrl,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -390,6 +393,7 @@ export class WAStartupService {
|
|||||||
stack: error?.stack,
|
stack: error?.stack,
|
||||||
name: error?.name,
|
name: error?.name,
|
||||||
url: baseURL,
|
url: baseURL,
|
||||||
|
server_url: serverUrl,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -424,6 +428,7 @@ export class WAStartupService {
|
|||||||
instance: this.instance.name,
|
instance: this.instance.name,
|
||||||
data,
|
data,
|
||||||
destination: localUrl,
|
destination: localUrl,
|
||||||
|
server_url: serverUrl,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -435,6 +440,7 @@ export class WAStartupService {
|
|||||||
instance: this.instance.name,
|
instance: this.instance.name,
|
||||||
data,
|
data,
|
||||||
destination: localUrl,
|
destination: localUrl,
|
||||||
|
server_url: serverUrl,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -448,6 +454,7 @@ export class WAStartupService {
|
|||||||
stack: error?.stack,
|
stack: error?.stack,
|
||||||
name: error?.name,
|
name: error?.name,
|
||||||
url: globalURL,
|
url: globalURL,
|
||||||
|
server_url: serverUrl,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1508,6 +1515,7 @@ export class WAStartupService {
|
|||||||
sender,
|
sender,
|
||||||
{
|
{
|
||||||
text: message['conversation'],
|
text: message['conversation'],
|
||||||
|
mentions,
|
||||||
} as unknown as AnyMessageContent,
|
} as unknown as AnyMessageContent,
|
||||||
option as unknown as MiscMessageGenerationOptions,
|
option as unknown as MiscMessageGenerationOptions,
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user