@@ -105,18 +105,19 @@ def get_title(self, obj):
105
105
"""
106
106
return obj .get ('title' ) or obj .get ('content' ) or 'Bridgy Response'
107
107
108
- def get_post (self , id ):
108
+ def get_post (self , id , ** kwargs ):
109
109
"""Fetch a post.
110
110
111
111
Args:
112
112
id: string, site-specific post id
113
113
is_event: bool
114
+ kwargs: passed through to get_activities
114
115
115
116
Returns: ActivityStreams object dict
116
117
"""
117
118
try :
118
119
posts = self .source .get_activities (
119
- activity_id = id , user_id = self .source .key .id ())
120
+ activity_id = id , user_id = self .source .key .id (), ** kwargs )
120
121
if posts :
121
122
return posts [0 ]
122
123
logging .warning ('Source post %s not found' , id )
@@ -242,7 +243,7 @@ def get_item(self, id):
242
243
243
244
class CommentHandler (ItemHandler ):
244
245
def get_item (self , post_id , id ):
245
- post = self .get_post (post_id )
246
+ post = self .get_post (post_id , fetch_replies = True )
246
247
cmt = self .source .get_comment (
247
248
id , activity_id = post_id , activity_author_id = self .source .key .id (),
248
249
activity = post )
@@ -256,7 +257,7 @@ def get_item(self, post_id, id):
256
257
257
258
class LikeHandler (ItemHandler ):
258
259
def get_item (self , post_id , user_id ):
259
- post = self .get_post (post_id )
260
+ post = self .get_post (post_id , fetch_likes = True )
260
261
like = self .source .get_like (self .source .key .string_id (), post_id , user_id ,
261
262
activity = post )
262
263
if post :
@@ -294,7 +295,7 @@ def get_item(self, post_id, user_id, reaction_id):
294
295
295
296
class RepostHandler (ItemHandler ):
296
297
def get_item (self , post_id , share_id ):
297
- post = self .get_post (post_id )
298
+ post = self .get_post (post_id , fetch_shares = True )
298
299
repost = self .source .gr_source .get_share (
299
300
self .source .key .string_id (), post_id , share_id , activity = post )
300
301
# webmention receivers don't want to see their own post in their
0 commit comments