forked from MirrorHub/mautrix-whatsapp
Fetch portal info before doing background sync
This ensures it doesn't re-add you if you left the group
This commit is contained in:
parent
4b69c16f1a
commit
0c0a55b940
1 changed files with 7 additions and 2 deletions
9
user.go
9
user.go
|
@ -309,8 +309,13 @@ func (user *User) doPuppetResync() {
|
|||
}
|
||||
}
|
||||
for _, portal := range portals {
|
||||
user.log.Debugfln("Doing background sync for %s", portal.Key.JID)
|
||||
portal.UpdateMatrixRoom(user, nil)
|
||||
groupInfo, err := user.Client.GetGroupInfo(portal.Key.JID)
|
||||
if err != nil {
|
||||
user.log.Warnfln("Failed to get group info for %s to do background sync: %v", portal.Key.JID, err)
|
||||
} else {
|
||||
user.log.Debugfln("Doing background sync for %s", portal.Key.JID)
|
||||
portal.UpdateMatrixRoom(user, groupInfo)
|
||||
}
|
||||
}
|
||||
if len(puppetJIDs) == 0 {
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue