Parellel goroutine
This commit is contained in:
parent
27bbc12d77
commit
a571f12af1
12
user.go
12
user.go
@ -593,11 +593,13 @@ func (user *User) syncPortals(chatMap map[string]groupme.Group, createAll bool)
|
|||||||
}
|
}
|
||||||
create := (chat.LastMessageTime >= user.LastConnection && user.LastConnection > 0) || i < limit
|
create := (chat.LastMessageTime >= user.LastConnection && user.LastConnection > 0) || i < limit
|
||||||
if len(chat.Portal.MXID) > 0 || create || createAll {
|
if len(chat.Portal.MXID) > 0 || create || createAll {
|
||||||
chat.Portal.Sync(user, chat.Group)
|
go func() {
|
||||||
err := chat.Portal.BackfillHistory(user, chat.LastMessageTime)
|
chat.Portal.Sync(user, chat.Group)
|
||||||
if err != nil {
|
err := chat.Portal.BackfillHistory(user, chat.LastMessageTime)
|
||||||
chat.Portal.log.Errorln("Error backfilling history:", err)
|
if err != nil {
|
||||||
}
|
chat.Portal.log.Errorln("Error backfilling history:", err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//TODO: handle leave from groupme side
|
//TODO: handle leave from groupme side
|
||||||
|
Loading…
Reference in New Issue
Block a user