GOWA - WhatsApp REST API with support for UI, Multi Account, Webhooks, and MCP, and Chatwoot. Built with Golang for efficient memory use.
Go botgogolanggolang-whatsappgolang-whatsapp-apirestrest-apiwhatsappwhatsapp-apiwhatsapp-api-gowhatsapp-multi-devicewhatsapp-web-multi-device
fix: resolve wrong phone_number in /group/participants and /group/participant-requests for @lid JIDs
Aldino Kemald718ef8ca076
diff --git a/src/usecase/group.go b/src/usecase/group.goindex d02b1151..cdf3dad5 100644--- a/src/usecase/group.go+++ b/src/usecase/group.go@@ -215,10 +215,12 @@ func (service serviceGroup) GetGroupParticipants(ctx context.Context, request do}}- // Use JID.User for clean phone number, fallback to PhoneNumber.String()- phoneNumber := participant.JID.User- if phoneNumber == "" {- phoneNumber = participant.PhoneNumber.String()+ // Resolve @lid JIDs to phone-based JIDs before extracting phone number+ resolvedJID := utils.ResolveLIDToPhone(ctx, participant.JID, client)+ phoneNumber := resolvedJID.User+ // If still an LID (resolution failed), try whatsmeow's PhoneNumber field+ if resolvedJID.Server == "lid" && !participant.PhoneNumber.IsEmpty() {+ phoneNumber = participant.PhoneNumber.User}participantData := domainGroup.GroupParticipant{@@ -280,9 +282,13 @@ func (service serviceGroup) GetGroupRequestParticipants(ctx context.Context, reqdisplayName = info.VerifiedName.Details.GetVerifiedName()}+ // Resolve @lid JIDs to phone-based JIDs before extracting phone number+ resolvedJID := utils.ResolveLIDToPhone(ctx, participant.JID, client)+ phoneNumber := resolvedJID.User+result = append(result, domainGroup.GetGroupRequestParticipantsResponse{JID: participant.JID.String(),- PhoneNumber: participant.JID.User,+ PhoneNumber: phoneNumber,DisplayName: displayName,RequestedAt: participant.RequestedAt,})