No flair actions on own posts/comments

This commit is contained in:
Jaakko Keränen 2024-01-14 18:15:46 +02:00
parent ce031e623b
commit 9a180636d5
No known key found for this signature in database
GPG Key ID: BACCFCFB98DB2EDC
1 changed files with 2 additions and 2 deletions

View File

@ -256,7 +256,7 @@ def make_post_page_or_configure_feed(session):
actions.append(f'=> /unlock/{post.id} 🔓 Unlock comments\n')
else:
actions.append(f'=> /lock/{post.id} 🔒 Lock comments\n')
if session.is_moderated(post):
if session.is_moderated(post) and post.user != session.user.id:
if session.user.role == User.ADMIN:
actions.append(f'=> /settings/flair/{post.poster_name}/add/ 📛 Set flair on {post.poster_name}\n')
else:
@ -397,7 +397,7 @@ def make_post_page(session, post):
actions.append(f'=> /thanks/{focused_cmt.id} 🙏 Give thanks\n')
actions.append(f'=> /remind/{focused_cmt.id} 🔔 Remind me\n')
if session.is_moderated(focused_cmt):
if session.is_moderated(focused_cmt) and focused_cmt.user != user.id:
if session.user.role == User.ADMIN:
actions.append(f'=> /settings/flair/{focused_cmt.poster_name}/add/ 📛 Set flair on {focused_cmt.poster_name}\n')
else: