Merge pull request #2085 from KokeroO/develop

Convert LIDs to PN by sending a call rejection message
This commit is contained in:
Davidson Gomes 2025-10-15 09:25:37 -03:00 committed by GitHub
commit 633d0b4c45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View File

@ -126,8 +126,6 @@
"devDependencies": {
"@commitlint/cli": "^19.8.1",
"@commitlint/config-conventional": "^19.8.1",
"@swc/core": "^1.13.5",
"@swc/helpers": "^0.5.17",
"@types/compression": "^1.7.5",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.18",

View File

@ -1720,6 +1720,9 @@ export class BaileysStartupService extends ChannelStartupService {
}
if (settings?.msgCall?.trim().length > 0 && call.status == 'offer') {
if (call.from.endsWith('@lid')) {
call.from = await this.client.signalRepository.lidMapping.getPNForLID(call.from as string);
}
const msg = await this.client.sendMessage(call.from, { text: settings.msgCall });
this.client.ev.emit('messages.upsert', { messages: [msg], type: 'notify' });

View File

@ -678,7 +678,7 @@ export class ChatwootService {
}
const isGroup = remoteJid.includes('@g.us');
const chatId = isGroup ? remoteJid : remoteJid.split('@')[0];
const chatId = isGroup ? remoteJid : remoteJid.split('@')[0].split(':')[0];
let nameContact = !body.key.fromMe ? body.pushName : chatId;
const filterInbox = await this.getInbox(instance);
if (!filterInbox) return null;