Fix linter errors

This commit is contained in:
Devon Hudson 2023-05-30 21:15:08 -06:00
parent 427bc2d930
commit bb72e3c114
No known key found for this signature in database
GPG key ID: CD06B18E77F6A628
3 changed files with 8 additions and 3 deletions

View file

@ -133,7 +133,6 @@ func CreateRoom(
}
// createRoom implements /createRoom
// nolint: gocyclo
func createRoom(
ctx context.Context,
// TODO: remove dependency on createRoomRequest

View file

@ -337,7 +337,11 @@ func buildMembershipEventDirect(
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)
}

View file

@ -42,6 +42,8 @@ type Creator struct {
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) {
createContent := map[string]interface{}{}
if len(createRequest.CreationContent) > 0 {
@ -419,7 +421,7 @@ func (c *Creator) PerformCreateRoom(ctx context.Context, userID spec.UserID, roo
IsDirect: createRequest.IsDirect,
}
if err := proto.SetContent(content); err != nil {
if err = proto.SetContent(content); err != nil {
return "", &util.JSONResponse{
Code: http.StatusInternalServerError,
JSON: spec.InternalServerError{},