diff --git a/freepost/__init__.py b/freepost/__init__.py index 24db177..856a468 100755 --- a/freepost/__init__.py +++ b/freepost/__init__.py @@ -689,8 +689,11 @@ def reply_check (hash_id): # We have a text, add the reply and redirect to the new reply reply_hash_id = database.new_comment (text, comment['postHashId'], user['id'], comment['id']) - # TODO upvote comment - # TODO Increase comments count for post + # Retrieve new comment + comment = database.get_comment (reply_hash_id) + + # Automatically add an upvote for the original poster + database.vote_comment (comment['id'], user['id'], +1) redirect (application.get_url ('post', hash_id=comment['postHashId']) + '#comment-' + reply_hash_id)