Fix internal/external group id issue

This commit is contained in:
Darren Clarke 2025-07-08 18:25:44 +02:00
parent a55e939592
commit 46e1116bc5
2 changed files with 4 additions and 2 deletions

View file

@ -82,7 +82,9 @@ const processMessage = async ({
dataMessage?.groupV2?.id || dataMessage?.groupV2?.id ||
dataMessage?.groupContext?.id || dataMessage?.groupContext?.id ||
dataMessage?.groupInfo?.groupId; dataMessage?.groupInfo?.groupId;
const toRecipient = groupId ?? phoneNumber; const toRecipient = groupId
? `group.${Buffer.from(groupId).toString("base64")}`
: phoneNumber;
const primaryMessage = { const primaryMessage = {
token: id, token: id,

View file

@ -231,7 +231,7 @@ class ChannelsCdrSignalController < ApplicationController
Rails.logger.info " - stored_chat_id: #{stored_chat_id}" Rails.logger.info " - stored_chat_id: #{stored_chat_id}"
Rails.logger.info " - incoming_group_id: #{receiver_phone_number}" Rails.logger.info " - incoming_group_id: #{receiver_phone_number}"
matches = receiver_phone_number == chat_id matches = receiver_phone_number == stored_chat_id
Rails.logger.info " - MATCH: #{matches}" Rails.logger.info " - MATCH: #{matches}"
matches matches