mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-29 12:42:46 +00:00
Fix newly found linter issues (#3099)
Fixes the issues found in https://github.com/matrix-org/dendrite/actions/runs/5155539352/jobs/9285342056#step:5:22. Only naked returns in longer functions.
This commit is contained in:
parent
ea6b368ad4
commit
d11da6ec7c
4 changed files with 10 additions and 9 deletions
|
@ -157,7 +157,7 @@ func (r *Peeker) performPeekRoomByID(
|
|||
content := map[string]string{}
|
||||
if err = json.Unmarshal(ev.Content(), &content); err != nil {
|
||||
util.GetLogger(ctx).WithError(err).Error("json.Unmarshal for history visibility failed")
|
||||
return
|
||||
return "", err
|
||||
}
|
||||
if visibility, ok := content["history_visibility"]; ok {
|
||||
worldReadable = visibility == "world_readable"
|
||||
|
@ -185,7 +185,7 @@ func (r *Peeker) performPeekRoomByID(
|
|||
},
|
||||
})
|
||||
if err != nil {
|
||||
return
|
||||
return "", err
|
||||
}
|
||||
|
||||
// By this point, if req.RoomIDOrAlias contained an alias, then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue