GODT-1351: Cache and update of space bytes in user object.

This commit is contained in:
Jakub
2021-09-21 14:54:15 +02:00
parent 41e15db442
commit 2899e7bb15
27 changed files with 243 additions and 49 deletions

View File

@ -337,6 +337,11 @@ func (loop *eventLoop) processEvent(event *pmapi.Event) (err error) {
}
}
if event.User != nil {
loop.user.UpdateSpace(event.User)
loop.listener.Emit(bridgeEvents.UserRefreshEvent, loop.user.ID())
}
// One would expect that every event would contain MessageCount as part of
// the event.Messages, but this is apparently not the case.
// MessageCounts are served on an irregular basis, so we should update and