mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-25 23:08:22 -05:00
Add gilded property to comment .json output.
This commit is contained in:
committed by
Neil Williams
parent
1eea551955
commit
efb0fd670b
@@ -357,7 +357,8 @@ class CommentJsonTemplate(ThingJsonTemplate):
|
||||
banned_by = "banned_by",
|
||||
approved_by = "approved_by",
|
||||
parent_id = "parent_id",
|
||||
edited = "editted"
|
||||
edited = "editted",
|
||||
gilded = "gilded",
|
||||
)
|
||||
|
||||
def thing_attr(self, thing, attr):
|
||||
@@ -378,6 +379,8 @@ class CommentJsonTemplate(ThingJsonTemplate):
|
||||
return make_fullname(Link, thing.link_id)
|
||||
elif attr == "body_html":
|
||||
return spaceCompress(safemarkdown(thing.body))
|
||||
elif attr == "gilded":
|
||||
return bool(thing.gildings)
|
||||
return ThingJsonTemplate.thing_attr(self, thing, attr)
|
||||
|
||||
def kind(self, wrapped):
|
||||
|
||||
Reference in New Issue
Block a user