mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
Refactor user & avatar (#33433)
1. better GetPossibleUserByID logic 2. fix some function name & comment typos 3. do not re-generate avatar if one exists
This commit is contained in:
@@ -117,7 +117,7 @@ func (input *notifyInput) Notify(ctx context.Context) {
|
||||
|
||||
func notify(ctx context.Context, input *notifyInput) error {
|
||||
shouldDetectSchedules := input.Event == webhook_module.HookEventPush && input.Ref.BranchName() == input.Repo.DefaultBranch
|
||||
if input.Doer.IsActions() {
|
||||
if input.Doer.IsGiteaActions() {
|
||||
// avoiding triggering cyclically, for example:
|
||||
// a comment of an issue will trigger the runner to add a new comment as reply,
|
||||
// and the new comment will trigger the runner again.
|
||||
|
@@ -109,7 +109,7 @@ func mailIssueCommentToParticipants(ctx *mailCommentContext, mentions []*user_mo
|
||||
}
|
||||
visited.AddMultiple(ids...)
|
||||
|
||||
unfilteredUsers, err := user_model.GetMaileableUsersByIDs(ctx, unfiltered, false)
|
||||
unfilteredUsers, err := user_model.GetMailableUsersByIDs(ctx, unfiltered, false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@@ -35,9 +35,9 @@ func MailNewRelease(ctx context.Context, rel *repo_model.Release) {
|
||||
return
|
||||
}
|
||||
|
||||
recipients, err := user_model.GetMaileableUsersByIDs(ctx, watcherIDList, false)
|
||||
recipients, err := user_model.GetMailableUsersByIDs(ctx, watcherIDList, false)
|
||||
if err != nil {
|
||||
log.Error("user_model.GetMaileableUsersByIDs: %v", err)
|
||||
log.Error("user_model.GetMailableUsersByIDs: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user