File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1297,6 +1297,16 @@ export class ChatwootService {
12971297 return ;
12981298 }
12991299
1300+ this . logger . verbose ( 'get conversation message' ) ;
1301+ const bodyMessage = await this . getConversationMessage ( body . message ) ;
1302+
1303+ const isMedia = this . isMediaMessage ( body . message ) ;
1304+
1305+ if ( ! bodyMessage && ! isMedia ) {
1306+ this . logger . warn ( 'no body message found' ) ;
1307+ return ;
1308+ }
1309+
13001310 this . logger . verbose ( 'get conversation in chatwoot' ) ;
13011311 const getConversion = await this . createConversation ( instance , body ) ;
13021312
@@ -1309,18 +1319,8 @@ export class ChatwootService {
13091319
13101320 this . logger . verbose ( 'message type: ' + messageType ) ;
13111321
1312- const isMedia = this . isMediaMessage ( body . message ) ;
1313-
13141322 this . logger . verbose ( 'is media: ' + isMedia ) ;
13151323
1316- this . logger . verbose ( 'get conversation message' ) ;
1317- const bodyMessage = await this . getConversationMessage ( body . message ) ;
1318-
1319- if ( ! bodyMessage && ! isMedia ) {
1320- this . logger . warn ( 'no body message found' ) ;
1321- return ;
1322- }
1323-
13241324 this . logger . verbose ( 'check if is media' ) ;
13251325 if ( isMedia ) {
13261326 this . logger . verbose ( 'message is media' ) ;
You can’t perform that action at this time.
0 commit comments