mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-16 18:33:49 +01:00
Fix handling contact messages
This commit is contained in:
parent
f3728024b0
commit
9ac7544b64
1 changed files with 3 additions and 0 deletions
3
user.go
3
user.go
|
@ -676,6 +676,9 @@ func (user *User) putMessage(message PortalMessage) {
|
|||
func (user *User) HandleNewContact(contact whatsapp.Contact) {
|
||||
user.log.Debugfln("Contact message: %+v", contact)
|
||||
go func() {
|
||||
if strings.HasSuffix(contact.Jid, whatsappExt.OldUserSuffix) {
|
||||
contact.Jid = strings.Replace(contact.Jid, whatsappExt.OldUserSuffix, whatsappExt.NewUserSuffix, -1)
|
||||
}
|
||||
puppet := user.bridge.GetPuppetByJID(contact.Jid)
|
||||
puppet.UpdateName(user, contact)
|
||||
}()
|
||||
|
|
Loading…
Reference in a new issue