Skip to content

Commit 633d0b4

Browse files
Merge pull request #2085 from KokeroO/develop
Convert LIDs to PN by sending a call rejection message
2 parents 20eef33 + 1756abf commit 633d0b4

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@
126126
"devDependencies": {
127127
"@commitlint/cli": "^19.8.1",
128128
"@commitlint/config-conventional": "^19.8.1",
129-
"@swc/core": "^1.13.5",
130-
"@swc/helpers": "^0.5.17",
131129
"@types/compression": "^1.7.5",
132130
"@types/cors": "^2.8.17",
133131
"@types/express": "^4.17.18",

src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,6 +1720,9 @@ export class BaileysStartupService extends ChannelStartupService {
17201720
}
17211721

17221722
if (settings?.msgCall?.trim().length > 0 && call.status == 'offer') {
1723+
if (call.from.endsWith('@lid')) {
1724+
call.from = await this.client.signalRepository.lidMapping.getPNForLID(call.from as string);
1725+
}
17231726
const msg = await this.client.sendMessage(call.from, { text: settings.msgCall });
17241727

17251728
this.client.ev.emit('messages.upsert', { messages: [msg], type: 'notify' });

src/api/integrations/chatbot/chatwoot/services/chatwoot.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ export class ChatwootService {
678678
}
679679

680680
const isGroup = remoteJid.includes('@g.us');
681-
const chatId = isGroup ? remoteJid : remoteJid.split('@')[0];
681+
const chatId = isGroup ? remoteJid : remoteJid.split('@')[0].split(':')[0];
682682
let nameContact = !body.key.fromMe ? body.pushName : chatId;
683683
const filterInbox = await this.getInbox(instance);
684684
if (!filterInbox) return null;

0 commit comments

Comments
 (0)