mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
JSON: add link_url to comments on profile pages
Adds the ability to get the original url of a link from within a comment comment object in the JSON response
This commit is contained in:
@@ -540,6 +540,11 @@ class CommentJsonTemplate(ThingJsonTemplate):
|
||||
if c.profilepage:
|
||||
d['link_title'] = thing.link.title
|
||||
d['link_author'] = thing.link_author.name
|
||||
if thing.link.is_self:
|
||||
d['link_url'] = thing.link.make_permalink(thing.subreddit,
|
||||
force_domain=True)
|
||||
else:
|
||||
d['link_url'] = thing.link.url
|
||||
return d
|
||||
|
||||
def rendered_data(self, wrapped):
|
||||
|
||||
Reference in New Issue
Block a user