Only send (invite) events to the AS if it's interested in it
This should hopefully fix (and maybe also
MODIFY
appservice/consumers/roomserver.go
appservice/consumers/roomserver.go
@@ -134,7 +134,7 @@ func (s *OutputRoomEventConsumer) onMessage(
}
case api.OutputTypeNewInviteEvent:
- if output.NewInviteEvent == nil {
+ if output.NewInviteEvent == nil || !s.appserviceIsInterestedInEvent(ctx, output.NewInviteEvent.Event, state.ApplicationService) {
continue
}
events = append(events, output.NewInviteEvent.Event)
@@ -281,9 +281,11 @@ func (s *OutputRoomEventConsumer) appserviceJoinedAtEvent(ctx context.Context, e
case err != nil:
continue
case membership.Membership == gomatrixserverlib.Join:
+ if appservice.IsInterestedInUserID(*ev.StateKey) {
return true
}
}
+ }
} else {
log.WithFields(log.Fields{
"appservice": appservice.ID,

Only send (invite) events to the AS if it's interested in it (#2692)

This should hopefully fix #2691 (and maybe also #2690)