diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2022-09-02 16:03:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-02 16:03:33 +0200 |
commit | 350a5e5393503780c6ab0a8983daae5301e845e2 (patch) | |
tree | 04743357ba6dbd58b92ec2b7db76a4fc70898bed /appservice | |
parent | fea869b41fc2a9f4db70ef664442a856c095f7c7 (diff) |
Only send (invite) events to the AS if it's interested in it (#2692)
This should hopefully fix #2691 (and maybe also #2690)
Diffstat (limited to 'appservice')
-rw-r--r-- | appservice/consumers/roomserver.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/appservice/consumers/roomserver.go b/appservice/consumers/roomserver.go index a30944e7..a4bcfa7d 100644 --- a/appservice/consumers/roomserver.go +++ b/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,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 { |