From 886226995bcdbe482c14a171da0f3bad4808a2d0 Mon Sep 17 00:00:00 2001 From: Chad Birch Date: Tue, 9 Apr 2013 23:59:25 -0600 Subject: [PATCH] Add 'link_title' for comment/post replies in API --- r2/r2/lib/jsontemplates.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/r2/r2/lib/jsontemplates.py b/r2/r2/lib/jsontemplates.py index 03e6448b9..cfcc0fcdb 100755 --- a/r2/r2/lib/jsontemplates.py +++ b/r2/r2/lib/jsontemplates.py @@ -495,6 +495,12 @@ class MessageJsonTemplate(ThingJsonTemplate): return make_fullname(Message, thing.first_message) return ThingJsonTemplate.thing_attr(self, thing, attr) + def raw_data(self, thing): + d = ThingJsonTemplate.raw_data(self, thing) + if thing.was_comment: + d['link_title'] = thing.link_title + return d + def rendered_data(self, wrapped): from r2.models import Message parent_id = wrapped.parent_id