aboutsummaryrefslogtreecommitdiff
path: root/clientapi/threepid
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-06-24 18:19:54 +0100
committerGitHub <noreply@github.com>2020-06-24 18:19:54 +0100
commite560619f76d3c54c018ed8117c20346ab79007b0 (patch)
tree676aa93b122c0b61d0e7784cf6a12288c28d2759 /clientapi/threepid
parenta06d0921c9a8551a7f488ad8ae972f1b982a49c1 (diff)
Refactor SendMembership - make ban test pass (#1160)
* Refactor SendMembership - make ban test pass * Only check invite auth events for local invites
Diffstat (limited to 'clientapi/threepid')
-rw-r--r--clientapi/threepid/invites.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/clientapi/threepid/invites.go b/clientapi/threepid/invites.go
index c308cb1f..89bc8606 100644
--- a/clientapi/threepid/invites.go
+++ b/clientapi/threepid/invites.go
@@ -88,10 +88,10 @@ func CheckAndProcessInvite(
ctx context.Context,
device *userapi.Device, body *MembershipRequest, cfg *config.Dendrite,
rsAPI api.RoomserverInternalAPI, db accounts.Database,
- membership string, roomID string,
+ roomID string,
evTime time.Time,
) (inviteStoredOnIDServer bool, err error) {
- if membership != gomatrixserverlib.Invite || (body.Address == "" && body.IDServer == "" && body.Medium == "") {
+ if body.Address == "" && body.IDServer == "" && body.Medium == "" {
// If none of the 3PID-specific fields are supplied, it's a standard invite
// so return nil for it to be processed as such
return