Handle WhatsApp chat create events

This commit is contained in:
Tulir Asokan
2020-06-26 00:13:18 +03:00
parent 8cfb04a5ed
commit 2132bc653b
2 changed files with 3 additions and 2 deletions

View File

@@ -861,7 +861,7 @@ func (user *User) HandleChatUpdate(cmd whatsappExt.ChatUpdate) {
portal := user.GetPortalByJID(cmd.JID)
if len(portal.MXID) == 0 {
if cmd.Data.Action == whatsappExt.ChatActionIntroduce && cmd.Data.SenderJID != "unknown" {
if cmd.Data.Action == whatsappExt.ChatActionIntroduce || cmd.Data.Action == whatsappExt.ChatActionCreate {
go func() {
err := portal.CreateMatrixRoom(user)
if err != nil {