mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-15 19:03:09 -06:00
Clean up code a bit
This commit is contained in:
parent
fd52f44658
commit
7813b019fd
|
|
@ -58,12 +58,12 @@ func SendMembership(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inviteStored, errRes := checkAndProcessThreepid(
|
inviteStored, jsonErrResp := checkAndProcessThreepid(
|
||||||
req, device, &body, cfg, queryAPI, accountDB, producer,
|
req, device, &body, cfg, queryAPI, accountDB, producer,
|
||||||
membership, roomID, evTime,
|
membership, roomID, evTime,
|
||||||
)
|
)
|
||||||
if errRes != nil {
|
if jsonErrResp != nil {
|
||||||
return *errRes
|
return *jsonErrResp
|
||||||
}
|
}
|
||||||
|
|
||||||
// If an invite has been stored on an identity server, it means that a
|
// If an invite has been stored on an identity server, it means that a
|
||||||
|
|
@ -211,9 +211,15 @@ func getMembershipStateKey(
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkAndProcessThreepid(
|
func checkAndProcessThreepid(
|
||||||
req *http.Request, device *authtypes.Device, body *threepid.MembershipRequest,
|
req *http.Request,
|
||||||
cfg config.Dendrite, queryAPI roomserverAPI.RoomserverQueryAPI, accountDB *accounts.Database,
|
device *authtypes.Device,
|
||||||
producer *producers.RoomserverProducer, membership string, roomID string, evTime time.Time,
|
body *threepid.MembershipRequest,
|
||||||
|
cfg config.Dendrite,
|
||||||
|
queryAPI roomserverAPI.RoomserverQueryAPI,
|
||||||
|
accountDB *accounts.Database,
|
||||||
|
producer *producers.RoomserverProducer,
|
||||||
|
membership, roomID string,
|
||||||
|
evTime time.Time,
|
||||||
) (inviteStored bool, errRes *util.JSONResponse) {
|
) (inviteStored bool, errRes *util.JSONResponse) {
|
||||||
|
|
||||||
inviteStored, err := threepid.CheckAndProcessInvite(
|
inviteStored, err := threepid.CheckAndProcessInvite(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue