mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 00:03:09 -06:00
Fix golint issue
This commit is contained in:
parent
ff88ca6977
commit
ee6f56f1f5
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue