mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Refactor SendMembership - make ban test pass (#1160)
* Refactor SendMembership - make ban test pass * Only check invite auth events for local invites
This commit is contained in:
parent
a06d0921c9
commit
e560619f76
8 changed files with 237 additions and 105 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue