mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 21:02:25 +03:00
Pass cfg by reference around the codebase (#819)
* Pass cfg by reference around the codebase * Merge branch 'master' into pass-cfg-by-ref Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
parent
b72d7eb0cf
commit
9937c05bea
30 changed files with 66 additions and 66 deletions
|
@ -41,7 +41,7 @@ var errMissingUserID = errors.New("'user_id' must be supplied")
|
|||
// by building a m.room.member event then sending it to the room server
|
||||
func SendMembership(
|
||||
req *http.Request, accountDB *accounts.Database, device *authtypes.Device,
|
||||
roomID string, membership string, cfg config.Dendrite,
|
||||
roomID string, membership string, cfg *config.Dendrite,
|
||||
queryAPI roomserverAPI.RoomserverQueryAPI, asAPI appserviceAPI.AppServiceQueryAPI,
|
||||
producer *producers.RoomserverProducer,
|
||||
) util.JSONResponse {
|
||||
|
@ -119,7 +119,7 @@ func buildMembershipEvent(
|
|||
body threepid.MembershipRequest, accountDB *accounts.Database,
|
||||
device *authtypes.Device,
|
||||
membership, roomID string,
|
||||
cfg config.Dendrite, evTime time.Time,
|
||||
cfg *config.Dendrite, evTime time.Time,
|
||||
queryAPI roomserverAPI.RoomserverQueryAPI, asAPI appserviceAPI.AppServiceQueryAPI,
|
||||
) (*gomatrixserverlib.Event, error) {
|
||||
stateKey, reason, err := getMembershipStateKey(body, device, membership)
|
||||
|
@ -165,7 +165,7 @@ func buildMembershipEvent(
|
|||
func loadProfile(
|
||||
ctx context.Context,
|
||||
userID string,
|
||||
cfg config.Dendrite,
|
||||
cfg *config.Dendrite,
|
||||
accountDB *accounts.Database,
|
||||
asAPI appserviceAPI.AppServiceQueryAPI,
|
||||
) (*authtypes.Profile, error) {
|
||||
|
@ -214,7 +214,7 @@ func checkAndProcessThreepid(
|
|||
req *http.Request,
|
||||
device *authtypes.Device,
|
||||
body *threepid.MembershipRequest,
|
||||
cfg config.Dendrite,
|
||||
cfg *config.Dendrite,
|
||||
queryAPI roomserverAPI.RoomserverQueryAPI,
|
||||
accountDB *accounts.Database,
|
||||
producer *producers.RoomserverProducer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue