From 6d4f8164ac97690a1993981605435cdc6ff097f2 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 20 Nov 2018 17:42:39 +0300 Subject: fix web avatar urls --- src/main/java/com/juick/server/www/WebApp.java | 4 ---- src/main/java/com/juick/server/www/controllers/MessagesWWW.java | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'src/main/java/com/juick/server/www') 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 += ""; } } else { - String msgImage = webApp.getAvatarPublicUrl(msg.getUser()); + String msgImage = webApp.getAvatarWebPath(msg.getUser()); headers += ""; } model.addAttribute("ogtype", "article"); -- cgit v1.2.3