Handle WhatsApp invites. Fixes #120

This commit is contained in:
Tulir Asokan committed 2020-06-26 00:13:03 +03:00
1 parent 326293303d
commit 8cfb04a5ed
3 files changed
+24 -2

No files matched your search

+2 -1
View File
@@ -47,6 +47,7 @@ const (
ChatActionDemote ChatActionType = "demote"
ChatActionIntroduce ChatActionType = "introduce"
ChatActionRemove ChatActionType = "remove"
ChatActionAdd ChatActionType = "add"
)
type ChatUpdateData struct {
@@ -128,7 +129,7 @@ func (cud *ChatUpdateData) UnmarshalJSON(data []byte) error {
unmarshalTo = &cud.Restrict
case ChatActionAnnounce:
unmarshalTo = &cud.Announce
case ChatActionPromote, ChatActionDemote, ChatActionRemove:
case ChatActionPromote, ChatActionDemote, ChatActionRemove, ChatActionAdd:
unmarshalTo = &cud.UserChange
default:
return nil