aboutsummaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-08-24 21:46:56 +0200
committerGitHub <noreply@github.com>2020-08-24 22:46:56 +0300
commit4b97f9018b51c1ef56c16154931123aac6080445 (patch)
tree2c25e4cbeb137a9bb747a38a68176de86da4f11c /models/repo.go
parent63f3c42be99cd72e765f7d8abfb8b2500b487855 (diff)
downloadgitea-4b97f9018b51c1ef56c16154931123aac6080445.tar.gz
gitea-4b97f9018b51c1ef56c16154931123aac6080445.zip
OpenGraph: use repo avatar if exist (#12586)
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go
index b9ebec8be9..d9b6576976 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -2254,6 +2254,11 @@ func (repo *Repository) relAvatarLink(e Engine) string {
return setting.AppSubURL + "/repo-avatars/" + repo.Avatar
}
+// AvatarLink returns a link to the repository's avatar.
+func (repo *Repository) AvatarLink() string {
+ return repo.avatarLink(x)
+}
+
// avatarLink returns user avatar absolute link.
func (repo *Repository) avatarLink(e Engine) string {
link := repo.relAvatarLink(e)