Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Add hook for Comment._gild().

  • Loading branch information...
commit 08ae778e9a05ddbf9d2cd9b97ab261d0e9103de9 1 parent 30d1c8f
@bsimpson63 bsimpson63 authored spladug committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 r2/r2/models/
4 r2/r2/models/
@@ -30,7 +30,7 @@
from r2.config import cache, extensions
from r2.lib.memoize import memoize
from r2.lib.filters import _force_utf8, _force_unicode
-from r2.lib import utils
+from r2.lib import hooks, utils
from r2.lib.log import log_text
from mako.filters import url_escape
from r2.lib.strings import strings, Score
@@ -839,6 +839,8 @@ def _gild(self, user):
m.insert(queries.get_all_gilded_comments(), [gilding])
m.insert(queries.get_gilded_comments(self.sr_id), [gilding])
+ hooks.get_hook('comment.gild').call(comment=self, gilder=user)
def _fill_in_parents(self):
if not self.parent_id:
self.parents = ''
Please sign in to comment.
Something went wrong with that request. Please try again.