mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-05-29 01:03:53 +02:00
Reduce unnecessary invite calls during history sync
This commit is contained in:
parent
c7b0f98f97
commit
1f6cedf948
|
@ -275,8 +275,9 @@ func (user *User) backfillInChunks(req *database.Backfill, conv *database.Histor
|
|||
|
||||
func (user *User) shouldCreatePortalForHistorySync(conv *database.HistorySyncConversation, portal *Portal) bool {
|
||||
if len(portal.MXID) > 0 {
|
||||
user.log.Debugfln("Portal for %s already exists, ensuring user is invited", portal.Key.JID)
|
||||
portal.ensureUserInvited(user)
|
||||
if !user.bridge.AS.StateStore.IsInRoom(portal.MXID, user.MXID) {
|
||||
portal.ensureUserInvited(user)
|
||||
}
|
||||
// Portal exists, let backfill continue
|
||||
return true
|
||||
} else if !user.bridge.Config.Bridge.HistorySync.CreatePortals {
|
||||
|
|
Loading…
Reference in a new issue