@@ -225,6 +225,28 @@ func (wa *WhatsAppClient) contactToUserInfo(ctx context.Context, jid types.JID,
225225 if contact .BusinessName == "" {
226226 contact .BusinessName = extraContact .BusinessName
227227 }
228+ if contact .PushName != "" && extraContact .PushName != "" && contact .PushName != extraContact .PushName {
229+ zerolog .Ctx (ctx ).Debug ().
230+ Stringer ("source_jid" , jid ).
231+ Stringer ("alt_jid" , altJID ).
232+ Str ("source_push_name" , contact .PushName ).
233+ Str ("alt_push_name" , extraContact .PushName ).
234+ Msg ("Conflicting push names between JIDs" )
235+ if altJID .Server == types .DefaultUserServer {
236+ contact .PushName = extraContact .PushName
237+ }
238+ }
239+ if contact .BusinessName != "" && extraContact .BusinessName != "" && contact .BusinessName != extraContact .BusinessName {
240+ zerolog .Ctx (ctx ).Debug ().
241+ Stringer ("source_jid" , jid ).
242+ Stringer ("alt_jid" , altJID ).
243+ Str ("source_push_name" , contact .BusinessName ).
244+ Str ("alt_push_name" , extraContact .BusinessName ).
245+ Msg ("Conflicting business names between JIDs" )
246+ if altJID .Server == types .DefaultUserServer {
247+ contact .BusinessName = extraContact .BusinessName
248+ }
249+ }
228250 }
229251 }
230252 }
0 commit comments