Fix issue with roomCounts always getting reset after a day change

This commit is contained in:
Till Faelligen 2022-10-05 07:36:03 +02:00
parent ec8114b9da
commit fc350e32ed
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E

View file

@ -129,6 +129,7 @@ func (s *OutputRoomEventConsumer) storeMessageStats(ctx context.Context, eventTy
// reset the roomCounts on a day change // reset the roomCounts on a day change
if s.lastUpdate.Day() != time.Now().Day() { if s.lastUpdate.Day() != time.Now().Day() {
s.roomCounts[s.serverName] = make(map[string]bool) s.roomCounts[s.serverName] = make(map[string]bool)
s.lastUpdate = time.Now()
} }
_, sender, err := gomatrixserverlib.SplitID('@', eventSender) _, sender, err := gomatrixserverlib.SplitID('@', eventSender)