home » zplus/freepost.git
Author zPlus <zplus@peers.community> 2018-07-19 06:59:14
Committer zPlus <zplus@peers.community> 2018-07-19 06:59:14
Commit d4059bd (patch)
Tree ecae06b
Parent(s)

+1 reply modified: freepost/__init__.py


commits diff: 79b4349..d4059bd
1 file changed, 5 insertions, 2 deletionsdownload


Diffstat
-rwxr-xr-x freepost/__init__.py 7

Diff options
View
Side
Whitespace
Context lines
Inter-hunk lines
+5/-2 M   freepost/__init__.py
index 24db177..856a468
old size: 25K - new size: 25K
@@ -689,8 +689,11 @@ def reply_check (hash_id):
689 689 # We have a text, add the reply and redirect to the new reply
690 690 reply_hash_id = database.new_comment (text, comment['postHashId'], user['id'], comment['id'])
691 691
692 - # TODO upvote comment
693 - # TODO Increase comments count for post
692 + # Retrieve new comment
693 + comment = database.get_comment (reply_hash_id)
694 +
695 + # Automatically add an upvote for the original poster
696 + database.vote_comment (comment['id'], user['id'], +1)
694 697
695 698 redirect (application.get_url ('post', hash_id=comment['postHashId']) + '#comment-' + reply_hash_id)
696 699