fix: fixed problems in localization template

This commit is contained in:
Davidson Gomes 2023-07-26 09:34:10 -03:00
parent 4769d75dc3
commit de0c9a1eff
2 changed files with 12 additions and 9 deletions

View File

@ -1,3 +1,9 @@
# 1.4.5 (2023-07-26 09:32)
### Fixed
* Fixed problems in localization template
# 1.4.4 (2023-07-25 15:24) # 1.4.4 (2023-07-25 15:24)
### Fixed ### Fixed

View File

@ -240,7 +240,6 @@ export class ChatwootService {
data['status'] = 'pending'; data['status'] = 'pending';
} }
console.log('this.provider', this.provider);
const conversation = await client.conversations.create({ const conversation = await client.conversations.create({
accountId: this.provider.account_id, accountId: this.provider.account_id,
data, data,
@ -1209,11 +1208,8 @@ export class ChatwootService {
audioMessage: msg.audioMessage?.caption, audioMessage: msg.audioMessage?.caption,
contactMessage: msg.contactMessage?.vcard, contactMessage: msg.contactMessage?.vcard,
contactsArrayMessage: msg.contactsArrayMessage, contactsArrayMessage: msg.contactsArrayMessage,
locationMessage: msg.locationMessage locationMessage: msg.locationMessage,
? msg.locationMessage?.degreesLatitude + liveLocationMessage: msg.liveLocationMessage,
',' +
msg.locationMessage?.degreesLongitude
: undefined,
}; };
this.logger.verbose('type message: ' + types); this.logger.verbose('type message: ' + types);
@ -1227,8 +1223,9 @@ export class ChatwootService {
const result = typeKey ? types[typeKey] : undefined; const result = typeKey ? types[typeKey] : undefined;
if (typeKey === 'locationMessage') { if (typeKey === 'locationMessage' || typeKey === 'liveLocationMessage') {
const [latitude, longitude] = result.split(','); const latitude = result.degreesLatitude;
const longitude = result.degreesLongitude;
const formattedLocation = `**Location:** const formattedLocation = `**Location:**
**latitude:** ${latitude} **latitude:** ${latitude}
@ -1311,7 +1308,7 @@ export class ChatwootService {
this.logger.verbose('get conversation message'); this.logger.verbose('get conversation message');
const types = this.getTypeMessage(msg); const types = this.getTypeMessage(msg);
=
const messageContent = this.getMessageContent(types); const messageContent = this.getMessageContent(types);
this.logger.verbose('conversation message: ' + messageContent); this.logger.verbose('conversation message: ' + messageContent);