@@ -240,7 +240,6 @@ export class ChatwootService {
240240 data [ 'status' ] = 'pending' ;
241241 }
242242
243- console . log ( 'this.provider' , this . provider ) ;
244243 const conversation = await client . conversations . create ( {
245244 accountId : this . provider . account_id ,
246245 data,
@@ -1209,11 +1208,8 @@ export class ChatwootService {
12091208 audioMessage : msg . audioMessage ?. caption ,
12101209 contactMessage : msg . contactMessage ?. vcard ,
12111210 contactsArrayMessage : msg . contactsArrayMessage ,
1212- locationMessage : msg . locationMessage
1213- ? msg . locationMessage ?. degreesLatitude +
1214- ',' +
1215- msg . locationMessage ?. degreesLongitude
1216- : undefined ,
1211+ locationMessage : msg . locationMessage ,
1212+ liveLocationMessage : msg . liveLocationMessage ,
12171213 } ;
12181214
12191215 this . logger . verbose ( 'type message: ' + types ) ;
@@ -1227,8 +1223,9 @@ export class ChatwootService {
12271223
12281224 const result = typeKey ? types [ typeKey ] : undefined ;
12291225
1230- if ( typeKey === 'locationMessage' ) {
1231- const [ latitude , longitude ] = result . split ( ',' ) ;
1226+ if ( typeKey === 'locationMessage' || typeKey === 'liveLocationMessage' ) {
1227+ const latitude = result . degreesLatitude ;
1228+ const longitude = result . degreesLongitude ;
12321229
12331230 const formattedLocation = `**Location:**
12341231 **latitude:** ${ latitude }
@@ -1311,7 +1308,7 @@ export class ChatwootService {
13111308 this . logger . verbose ( 'get conversation message' ) ;
13121309
13131310 const types = this . getTypeMessage ( msg ) ;
1314-
1311+ =
13151312 const messageContent = this . getMessageContent ( types ) ;
13161313
13171314 this . logger . verbose ( 'conversation message: ' + messageContent ) ;
0 commit comments