Fix golint issue

This commit is contained in:
Alex Kursell 2020-12-02 17:18:28 -05:00
parent ff88ca6977
commit ee6f56f1f5

View file

@ -51,13 +51,6 @@ type databaseJoinedMember struct {
AvatarURL string `json:"avatar_url"` AvatarURL string `json:"avatar_url"`
} }
func (d databaseJoinedMember) toJoinedMember() joinedMember {
return joinedMember{
DisplayName: d.DisplayName,
AvatarURL: d.AvatarURL,
}
}
// GetMemberships implements GET /rooms/{roomId}/members // GetMemberships implements GET /rooms/{roomId}/members
func GetMemberships( func GetMemberships(
req *http.Request, device *userapi.Device, roomID string, joinedOnly bool, req *http.Request, device *userapi.Device, roomID string, joinedOnly bool,
@ -91,7 +84,7 @@ func GetMemberships(
util.GetLogger(req.Context()).WithError(err).Error("failed to unmarshal event content") util.GetLogger(req.Context()).WithError(err).Error("failed to unmarshal event content")
return jsonerror.InternalServerError() return jsonerror.InternalServerError()
} }
res.Joined[ev.Sender] = content.toJoinedMember() res.Joined[ev.Sender] = joinedMember(content)
} }
return util.JSONResponse{ return util.JSONResponse{
Code: http.StatusOK, Code: http.StatusOK,