mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-25 10:05:24 +09:00
refactor: getPoster
This commit is contained in:
@ -35,16 +35,7 @@ func (comments CommentList) LoadPosters(ctx context.Context) error {
|
||||
}
|
||||
|
||||
for _, comment := range comments {
|
||||
if comment.PosterID == user_model.ActionsUserID {
|
||||
comment.Poster = user_model.NewActionsUser()
|
||||
} else if comment.PosterID <= 0 {
|
||||
continue
|
||||
} else {
|
||||
var ok bool
|
||||
if comment.Poster, ok = posterMaps[comment.PosterID]; !ok {
|
||||
comment.Poster = user_model.NewGhostUser()
|
||||
}
|
||||
}
|
||||
comment.Poster = getPoster(comment.PosterID, posterMaps)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user