Skip to content

Commit 1d3d557

Browse files
committed
Merge branch 'release/1.4.5'
2 parents 6b926dc + 3f41974 commit 1d3d557

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# 1.4.5 (2023-07-26 09:32)
2+
3+
### Fixed
4+
5+
* Fixed problems in localization template in chatwoot
6+
* Fix mids going duplicated in chatwoot
7+
18
# 1.4.4 (2023-07-25 15:24)
29

310
### Fixed

src/whatsapp/services/chatwoot.service.ts

Lines changed: 5 additions & 8 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}

src/whatsapp/services/whatsapp.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ export class WAStartupService {
11471147

11481148
if (
11491149
type !== 'notify' ||
1150-
// received.message?.protocolMessage ||
1150+
received.message?.protocolMessage ||
11511151
received.message?.pollUpdateMessage
11521152
) {
11531153
this.logger.verbose('message rejected');
@@ -1277,7 +1277,7 @@ export class WAStartupService {
12771277
5: 'PLAYED',
12781278
};
12791279
for await (const { key, update } of args) {
1280-
if (settings.groups_ignore && key.remoteJid.includes('@g.us')) {
1280+
if (settings?.groups_ignore && key.remoteJid.includes('@g.us')) {
12811281
this.logger.verbose('group ignored');
12821282
return;
12831283
}

0 commit comments

Comments
 (0)