0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-05-17 04:43:50 +02:00

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

This should hopefully fix #2691 (and maybe also #2690)
This commit is contained in:
Till 2022-09-02 16:03:33 +02:00 committed by GitHub
parent fea869b41f
commit 350a5e5393
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,7 +281,9 @@ func (s *OutputRoomEventConsumer) appserviceJoinedAtEvent(ctx context.Context, e
case err != nil:
continue
case membership.Membership == gomatrixserverlib.Join:
return true
if appservice.IsInterestedInUserID(*ev.StateKey) {
return true
}
}
}
} else {