userinfo: skip resync if client isn't logged in

This commit is contained in:
Tulir Asokan 2024-10-18 16:55:30 +03:00
parent 220dc219b8
commit 905f9ff976

View file

@ -92,6 +92,10 @@ func (wa *WhatsAppClient) rotateResyncQueue() map[types.JID]resyncQueueItem {
func (wa *WhatsAppClient) doGhostResync(ctx context.Context, queue map[types.JID]resyncQueueItem) {
log := zerolog.Ctx(ctx)
if !wa.IsLoggedIn() {
log.Warn().Msg("Not logged in, skipping background resyncs")
return
}
log.Debug().Msg("Starting background resyncs")
defer log.Debug().Msg("Background resyncs finished")
var ghostJIDs []types.JID