Skip to content

Commit

Permalink
fix: fixed problems in localization template
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidsonGomes committed Jul 26, 2023
1 parent 4769d75 commit de0c9a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

### Fixed
Expand Down
15 changes: 6 additions & 9 deletions src/whatsapp/services/chatwoot.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ export class ChatwootService {
data['status'] = 'pending';
}

console.log('this.provider', this.provider);
const conversation = await client.conversations.create({
accountId: this.provider.account_id,
data,
Expand Down Expand Up @@ -1209,11 +1208,8 @@ export class ChatwootService {
audioMessage: msg.audioMessage?.caption,
contactMessage: msg.contactMessage?.vcard,
contactsArrayMessage: msg.contactsArrayMessage,
locationMessage: msg.locationMessage
? msg.locationMessage?.degreesLatitude +
',' +
msg.locationMessage?.degreesLongitude
: undefined,
locationMessage: msg.locationMessage,
liveLocationMessage: msg.liveLocationMessage,
};

this.logger.verbose('type message: ' + types);
Expand All @@ -1227,8 +1223,9 @@ export class ChatwootService {

const result = typeKey ? types[typeKey] : undefined;

if (typeKey === 'locationMessage') {
const [latitude, longitude] = result.split(',');
if (typeKey === 'locationMessage' || typeKey === 'liveLocationMessage') {
const latitude = result.degreesLatitude;
const longitude = result.degreesLongitude;

const formattedLocation = `**Location:**
**latitude:** ${latitude}
Expand Down Expand Up @@ -1311,7 +1308,7 @@ export class ChatwootService {
this.logger.verbose('get conversation message');

const types = this.getTypeMessage(msg);

=
const messageContent = this.getMessageContent(types);

this.logger.verbose('conversation message: ' + messageContent);
Expand Down

0 comments on commit de0c9a1

Please sign in to comment.