diff options
author | Vitaly Takmazov | 2018-11-20 17:42:39 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-11-20 17:42:39 +0300 |
commit | 6d4f8164ac97690a1993981605435cdc6ff097f2 (patch) | |
tree | af86327338539d41707a0e6b6c1c2d46fece8878 /src/main/java/com/juick/server/www | |
parent | b5eed5e659c94eb618b3f35dff92988e2860235c (diff) |
fix web avatar urls
Diffstat (limited to 'src/main/java/com/juick/server/www')
-rw-r--r-- | src/main/java/com/juick/server/www/WebApp.java | 4 | ||||
-rw-r--r-- | src/main/java/com/juick/server/www/controllers/MessagesWWW.java | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/src/main/java/com/juick/server/www/WebApp.java b/src/main/java/com/juick/server/www/WebApp.java index 3ab09de2..08c6188d 100644 --- a/src/main/java/com/juick/server/www/WebApp.java +++ b/src/main/java/com/juick/server/www/WebApp.java @@ -79,8 +79,4 @@ public class WebApp { } return resourceUrlProvider.getForLookupPath("/av-96.png"); } - public String getAvatarPublicUrl(User user) { - UriComponentsBuilder uri = UriComponentsBuilder.fromUriString(baseImagesUri); - return uri.replacePath(getAvatarWebPath(user)).toUriString(); - } } diff --git a/src/main/java/com/juick/server/www/controllers/MessagesWWW.java b/src/main/java/com/juick/server/www/controllers/MessagesWWW.java index ba8e7b66..ad988bcb 100644 --- a/src/main/java/com/juick/server/www/controllers/MessagesWWW.java +++ b/src/main/java/com/juick/server/www/controllers/MessagesWWW.java @@ -551,7 +551,7 @@ public class MessagesWWW { headers += "<meta property=\"og:image\" content=\"" + msgImage + "\" />"; } } else { - String msgImage = webApp.getAvatarPublicUrl(msg.getUser()); + String msgImage = webApp.getAvatarWebPath(msg.getUser()); headers += "<meta property=\"og:image\" content=\"" + msgImage + "\" />"; } model.addAttribute("ogtype", "article"); |