1
0
Fork 0
mirror of https://github.com/matrix-org/dendrite.git synced 2025-04-04 07:54:28 -05:00

Make the linter happy?

This commit is contained in:
Till Faelligen 2023-09-26 14:21:28 +02:00
parent b41baee892
commit e5f26edefa
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E

View file

@ -112,6 +112,11 @@ func (s *OutputRoomEventConsumer) onMessage(ctx context.Context, msgs []*nats.Ms
event = output.NewInviteEvent.Event
}
if event == nil {
log.Errorf("userapi consumer: expected event")
return true
}
log.WithFields(log.Fields{
"event_id": event.EventID(),
"event_type": event.Type(),
@ -120,11 +125,6 @@ func (s *OutputRoomEventConsumer) onMessage(ctx context.Context, msgs []*nats.Ms
return true
}
if event == nil {
log.Errorf("userapi consumer: expected event")
return true
}
if s.cfg.Matrix.ReportStats.Enabled {
go s.storeMessageStats(ctx, event.Type(), string(event.SenderID()), event.RoomID().String())
}