mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-13 09:03:10 +01:00
Improve handling of weird potentially non-corner case in GetMessageIntent()
This commit is contained in:
parent
87b135e2a6
commit
b978930c88
1 changed files with 5 additions and 1 deletions
|
@ -396,7 +396,11 @@ func (portal *Portal) GetMessageIntent(info whatsapp.MessageInfo) *appservice.In
|
|||
} else if portal.IsPrivateChat() {
|
||||
return portal.MainIntent()
|
||||
} else if len(info.SenderJid) == 0 {
|
||||
return nil
|
||||
if len(info.Source.GetParticipant()) != 0 {
|
||||
info.SenderJid = info.Source.GetParticipant()
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
return portal.user.GetPuppetByJID(info.SenderJid).Intent()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue