diff options
Diffstat (limited to 'src/main/java/com/juick/server/api/rss')
-rw-r--r-- | src/main/java/com/juick/server/api/rss/MessagesView.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/com/juick/server/api/rss/MessagesView.java b/src/main/java/com/juick/server/api/rss/MessagesView.java index c0ae4a97..4b29108e 100644 --- a/src/main/java/com/juick/server/api/rss/MessagesView.java +++ b/src/main/java/com/juick/server/api/rss/MessagesView.java @@ -21,6 +21,7 @@ import com.juick.Message; import com.juick.User; import com.juick.server.api.rss.extension.JuickModule; import com.juick.server.api.rss.extension.JuickModuleImpl; +import com.juick.server.www.WebApp; import com.juick.util.MessageUtils; import com.rometools.modules.atom.modules.AtomLinkModule; import com.rometools.modules.atom.modules.AtomLinkModuleImpl; @@ -40,6 +41,7 @@ import org.springframework.web.servlet.view.feed.AbstractRssFeedView; import javax.annotation.Nonnull; import javax.annotation.PostConstruct; +import javax.inject.Inject; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.net.URI; @@ -57,6 +59,9 @@ public class MessagesView extends AbstractRssFeedView { private static final Logger logger = LoggerFactory.getLogger(MessagesView.class); + @Inject + private WebApp webApp; + @PostConstruct public void init() { setContentType("application/rss+xml;charset=UTF-8"); @@ -82,7 +87,7 @@ public class MessagesView extends AbstractRssFeedView { String link = String.format("http://juick.com/%s/", user.getName()); feed.setLink(link); Image rssImage = new Image(); - rssImage.setUrl(String.format("http://juick.com/a/%d.png", user.getUid())); + rssImage.setUrl(webApp.getAvatarPublicUrl(user)); rssImage.setTitle(title); rssImage.setLink(link); feed.setImage(rssImage); |