Opening comments now uses the comment permalink.

This commit is contained in:
Michael Lazar
2015-05-16 18:05:48 -07:00
parent 40987fa1e8
commit 71e464d03f
2 changed files with 9 additions and 3 deletions

View File

@@ -83,6 +83,8 @@ class BaseContent(object):
sub_author = getattr(sub, 'author', '[deleted]')
sub_name = getattr(sub_author, 'name', '[deleted]')
flair = getattr(comment, 'author_flair_text', '')
permalink = getattr(comment, 'permalink', None)
data['type'] = 'Comment'
data['body'] = comment.body
data['created'] = humanize_timestamp(comment.created_utc)
@@ -92,6 +94,7 @@ class BaseContent(object):
data['flair'] = flair
data['likes'] = comment.likes
data['gold'] = comment.gilded > 0
data['permalink'] = permalink
return data