Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-28 04:36:11 +01:00

#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.
This commit is contained in:
Unknwon 2016-02-15 15:18:53 -05:00
parent 632c27802c
commit 2765b5c7cf
2 changed files with 2 additions and 2 deletions

View file

@ -498,7 +498,7 @@ func CommitRepoAction(
payloadSender := &api.PayloadUser{ payloadSender := &api.PayloadUser{
UserName: pusher.Name, UserName: pusher.Name,
ID: pusher.Id, ID: pusher.Id,
AvatarUrl: setting.AppUrl + pusher.RelAvatarLink(), AvatarUrl: pusher.AvatarLink(),
} }
switch opType { switch opType {

View file

@ -364,7 +364,7 @@ func TestWebhook(ctx *middleware.Context) {
Sender: &api.PayloadUser{ Sender: &api.PayloadUser{
UserName: ctx.User.Name, UserName: ctx.User.Name,
ID: ctx.User.Id, 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 { if err := models.PrepareWebhooks(ctx.Repo.Repository, models.HOOK_EVENT_PUSH, p); err != nil {