diff options
author | Unknwon <u@gogs.io> | 2016-02-15 15:18:53 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-02-15 15:18:53 -0500 |
commit | 2765b5c7cf6fa234fd86a14ee50597f8ed841c18 (patch) | |
tree | 3d57a8dc1a7f0bbc7988e0cf3e63ecf4375021b6 | |
parent | 632c27802c13f95ba95ba48eb6056d5af760183e (diff) | |
download | gitea-2765b5c7cf6fa234fd86a14ee50597f8ed841c18.tar.gz gitea-2765b5c7cf6fa234fd86a14ee50597f8ed841c18.zip |
#2630 fix wrong user avatar link in webhook
Was using the wrong method and now uses the method which checks if
the avatar link is relative or not.
-rw-r--r-- | models/action.go | 2 | ||||
-rw-r--r-- | routers/repo/webhook.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/models/action.go b/models/action.go index 8d7dd6fa3d..3bcf999d9f 100644 --- a/models/action.go +++ b/models/action.go @@ -498,7 +498,7 @@ func CommitRepoAction( payloadSender := &api.PayloadUser{ UserName: pusher.Name, ID: pusher.Id, - AvatarUrl: setting.AppUrl + pusher.RelAvatarLink(), + AvatarUrl: pusher.AvatarLink(), } switch opType { diff --git a/routers/repo/webhook.go b/routers/repo/webhook.go index 458670ad2f..a1b3633043 100644 --- a/routers/repo/webhook.go +++ b/routers/repo/webhook.go @@ -364,7 +364,7 @@ func TestWebhook(ctx *middleware.Context) { Sender: &api.PayloadUser{ UserName: ctx.User.Name, ID: ctx.User.Id, - AvatarUrl: setting.AppUrl + ctx.User.RelAvatarLink(), + AvatarUrl: ctx.User.AvatarLink(), }, } if err := models.PrepareWebhooks(ctx.Repo.Repository, models.HOOK_EVENT_PUSH, p); err != nil { |