Update consumers

This commit is contained in:
Neil Alexander 2020-12-03 10:48:50 +00:00
parent 4c01a34115
commit cde796932f
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -105,6 +105,8 @@ func (s *OutputRoomEventConsumer) onMessage(msg *sarama.ConsumerMessage) error {
return s.onRetireInviteEvent(context.TODO(), *output.RetireInviteEvent)
case api.OutputTypeNewPeek:
return s.onNewPeek(context.TODO(), *output.NewPeek)
case api.OutputTypeRetirePeek:
return s.onRetirePeek(context.TODO(), *output.RetirePeek)
case api.OutputTypeRedactedEvent:
return s.onRedactEvent(context.TODO(), *output.RedactedEvent)
default:
@ -310,7 +312,7 @@ func (s *OutputRoomEventConsumer) onNewPeek(
}
func (s *OutputRoomEventConsumer) onRetirePeek(
ctx context.Context, msg api.OutputNewPeek,
ctx context.Context, msg api.OutputRetirePeek,
) error {
sp, err := s.db.DeletePeek(ctx, msg.RoomID, msg.UserID, msg.DeviceID)
if err != nil {