put in mod log

master
Aevann 2024-10-19 08:48:14 +03:00
parent 0f3f4285bb
commit 0661d3790a
2 changed files with 17 additions and 0 deletions

View File

@ -361,6 +361,15 @@ def comment(v):
coins=0
)
g.db.add(vote)
if c.distinguished:
ma = ModAction(
kind='distinguish_comment',
user_id=v.id,
target_post_id=c.id
)
g.db.add(ma)
cache.delete_memoized(comment_idlist)
if not (c.parent_post in ADMIGGER_THREADS and c.level == 1):

View File

@ -747,6 +747,14 @@ def submit_post(v, hole=None):
p.pinned_utc = time.time() + PINNED_POSTS_IDS[v.id] * 3600
p.pinned = "AutoJanny"
if p.distinguished:
ma = ModAction(
kind='distinguish_post',
user_id=v.id,
target_post_id=p.id
)
g.db.add(ma)
cache.delete_memoized(frontlist)
cache.delete_memoized(userpagelisting)