Skip to content

Commit

Permalink
Fix purge
Browse files Browse the repository at this point in the history
  • Loading branch information
Pdzly committed Dec 19, 2023
1 parent e7924fc commit 8c77e3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lemmylib/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ def purge_comment(self, comment_id: int, reason: str | None = None):
return self.call_api(LemmyApiMethod.POST, f'admin/purge/comment',
data={'reason': reason, 'comment_id': comment_id})

def get_post(self, post_id: int):
def get_post(self, post_id: int, comment_id: int | None = None):
self._logger.debug("LemmyLib get_post")

return self.call_api(LemmyApiMethod.GET, f'post', params={'id': post_id})
return self.call_api(LemmyApiMethod.GET, f'post', params={'id': post_id, 'comment_id': comment_id})

def get_comment(self, comment_id: int):
self._logger.debug("LemmyLib get_comment")
Expand Down

0 comments on commit 8c77e3c

Please sign in to comment.