Handle WhatsApp invites. Fixes #120

This commit is contained in:
Tulir Asokan
2020-06-26 00:05:51 +03:00
parent 326293303d
commit 8cfb04a5ed
3 changed files with 24 additions and 2 deletions

View File

@@ -889,6 +889,8 @@ func (user *User) HandleChatUpdate(cmd whatsappExt.ChatUpdate) {
go portal.RestrictMetadataChanges(cmd.Data.Restrict)
case whatsappExt.ChatActionRemove:
go portal.HandleWhatsAppKick(cmd.Data.SenderJID, cmd.Data.UserChange.JIDs)
case whatsappExt.ChatActionAdd:
go portal.HandleWhatsAppInvite(cmd.Data.SenderJID, cmd.Data.UserChange.JIDs)
case whatsappExt.ChatActionIntroduce:
if cmd.Data.SenderJID != "unknown" {
go portal.Sync(user, whatsapp.Contact{Jid: portal.Key.JID})