mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 02:23:10 -06:00
Fix linter errors
This commit is contained in:
parent
427bc2d930
commit
bb72e3c114
|
|
@ -133,7 +133,6 @@ func CreateRoom(
|
||||||
}
|
}
|
||||||
|
|
||||||
// createRoom implements /createRoom
|
// createRoom implements /createRoom
|
||||||
// nolint: gocyclo
|
|
||||||
func createRoom(
|
func createRoom(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
// TODO: remove dependency on createRoomRequest
|
// TODO: remove dependency on createRoomRequest
|
||||||
|
|
|
||||||
|
|
@ -337,7 +337,11 @@ func buildMembershipEventDirect(
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
identity := &fclient.SigningIdentity{senderDomain, keyID, privateKey}
|
identity := &fclient.SigningIdentity{
|
||||||
|
ServerName: senderDomain,
|
||||||
|
KeyID: keyID,
|
||||||
|
PrivateKey: privateKey,
|
||||||
|
}
|
||||||
return eventutil.QueryAndBuildEvent(ctx, &proto, identity, evTime, rsAPI, nil)
|
return eventutil.QueryAndBuildEvent(ctx, &proto, identity, evTime, rsAPI, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@ type Creator struct {
|
||||||
RSAPI api.RoomserverInternalAPI
|
RSAPI api.RoomserverInternalAPI
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PerformCreateRoom handles all the steps necessary to create a new room.
|
||||||
|
// nolint: gocyclo
|
||||||
func (c *Creator) PerformCreateRoom(ctx context.Context, userID spec.UserID, roomID spec.RoomID, createRequest *api.PerformCreateRoomRequest) (string, *util.JSONResponse) {
|
func (c *Creator) PerformCreateRoom(ctx context.Context, userID spec.UserID, roomID spec.RoomID, createRequest *api.PerformCreateRoomRequest) (string, *util.JSONResponse) {
|
||||||
createContent := map[string]interface{}{}
|
createContent := map[string]interface{}{}
|
||||||
if len(createRequest.CreationContent) > 0 {
|
if len(createRequest.CreationContent) > 0 {
|
||||||
|
|
@ -419,7 +421,7 @@ func (c *Creator) PerformCreateRoom(ctx context.Context, userID spec.UserID, roo
|
||||||
IsDirect: createRequest.IsDirect,
|
IsDirect: createRequest.IsDirect,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := proto.SetContent(content); err != nil {
|
if err = proto.SetContent(content); err != nil {
|
||||||
return "", &util.JSONResponse{
|
return "", &util.JSONResponse{
|
||||||
Code: http.StatusInternalServerError,
|
Code: http.StatusInternalServerError,
|
||||||
JSON: spec.InternalServerError{},
|
JSON: spec.InternalServerError{},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue