Support bot user

This commit is contained in:
Lunny Xiao
2022-11-14 20:59:44 +08:00
committed by Jason Song
parent 1ddf3b2d12
commit aa09eb63e1
12 changed files with 120 additions and 84 deletions

View File

@ -243,7 +243,7 @@ func (issue *Issue) LoadLabels(ctx context.Context) (err error) {
// LoadPoster loads poster
func (issue *Issue) LoadPoster(ctx context.Context) (err error) {
if issue.Poster == nil {
issue.Poster, err = user_model.GetUserByIDCtx(ctx, issue.PosterID)
issue.Poster, err = user_model.GetPossbileUserByID(ctx, issue.PosterID)
if err != nil {
issue.PosterID = -1
issue.Poster = user_model.NewGhostUser()