Skip to content

Commit de0c9a1

Browse files
committed
fix: fixed problems in localization template
1 parent 4769d75 commit de0c9a1

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 1.4.5 (2023-07-26 09:32)
2+
3+
### Fixed
4+
5+
* Fixed problems in localization template
6+
17
# 1.4.4 (2023-07-25 15:24)
28

39
### Fixed

src/whatsapp/services/chatwoot.service.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)