mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-19 03:42:23 -06:00
Merge pull request #918 from judsonjuniorr/fix/validate-message-before-sending-chatwoot
Fix/validate message before sending chatwoot
This commit is contained in:
@@ -890,6 +890,13 @@ export class ChatwootService {
|
||||
sourceId?: string,
|
||||
quotedMsg?: MessageModel,
|
||||
) {
|
||||
if (sourceId && this.isImportHistoryAvailable()) {
|
||||
const messageAlreadySaved = await chatwootImport.getExistingSourceIds([sourceId]);
|
||||
if (messageAlreadySaved.size > 0) {
|
||||
this.logger.warn('Message already saved on chatwoot');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
const data = new FormData();
|
||||
|
||||
if (content) {
|
||||
|
||||
Reference in New Issue
Block a user