diff --git a/r2/r2/controllers/api.py b/r2/r2/controllers/api.py index 59df52e96..e951d4a75 100755 --- a/r2/r2/controllers/api.py +++ b/r2/r2/controllers/api.py @@ -39,6 +39,7 @@ from r2.models import * from r2.lib import amqp from r2.lib import recommender +from r2.lib import hooks from r2.lib.utils import get_title, sanitize_url, timeuntil, set_last_modified from r2.lib.utils import query_string, timefromnow, randstr @@ -2237,6 +2238,8 @@ class ApiController(RedditController, OAuth2ResourceController): thing.distinguished = how thing._commit() + hooks.get_hook("thing.distinguish").call(thing=thing) + wrapper = default_thing_wrapper(expand_children = True) w = wrap_links(thing, wrapper) jquery(".content").replace_things(w, True, True)