Pre-fetch group chats for disco queries

This commit is contained in:
Bohdan Horbeshko 2026-08-13 23:24:40 -04:00
parent 220083df74
commit b315eeff1e

View file

@ -172,6 +172,10 @@ func (c *Client) Connect(resource string, wasSessionLoginEmpty bool) error {
log.Infof("Obtained ≈%v chats for initialization", chats.TotalCount)
}
if c.Session.MUC {
log.Infof("Warmed cache for %v group chats for initialization", len(c.GetGroupChats()))
}
gateway.SubscribeToTransport(c.xmpp, c.jid)
loggedInString := "Logged in as: " + c.Session.Login
c.sendPresence(gateway.SPStatus(loggedInString))