mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-06 14:33:10 -06:00
Don't log the same error twice, undo unrelated change
This commit is contained in:
parent
d216eea879
commit
099233770b
|
|
@ -119,7 +119,7 @@ func (s *OutputRoomEventConsumer) onMessage(
|
|||
for _, msg := range msgs {
|
||||
// Only handle events we care about
|
||||
receivedType := api.OutputType(msg.Header.Get(jetstream.RoomEventType))
|
||||
if receivedType != api.OutputTypeNewRoomEvent {
|
||||
if receivedType != api.OutputTypeNewRoomEvent && receivedType != api.OutputTypeNewInviteEvent {
|
||||
continue
|
||||
}
|
||||
// Parse out the event JSON
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ package producers
|
|||
|
||||
import (
|
||||
"github.com/nats-io/nats.go"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// AppserviceEventProducer produces events for the appservice API to consume
|
||||
|
|
@ -29,9 +28,6 @@ func (a *AppserviceEventProducer) ProduceRoomEvents(
|
|||
msg *nats.Msg,
|
||||
) error {
|
||||
msg.Subject = a.Topic
|
||||
if _, err := a.JetStream.PublishMsg(msg); err != nil {
|
||||
logrus.WithError(err).Errorf("Failed to produce to topic '%s': %s", a.Topic, err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
_, err := a.JetStream.PublishMsg(msg)
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue