diff --git a/files/helpers/const.py b/files/helpers/const.py
index 96a75390e..05674ec42 100644
--- a/files/helpers/const.py
+++ b/files/helpers/const.py
@@ -524,4 +524,4 @@ NOTIFIED_USERS = {
'kippy': KIPPY_ID,
}
-FORTUNE_REPLIES = ('Your fortune: Allah Wills It','Your fortune: Inshallah, Only Good Things Shall Come To Pass','Your fortune: Allah Smiles At You This Day','Your fortune: Your Bussy Is In For A Blasting','Your fortune: You Will Be Propositioned By A High-Tier Twink','Your fortune: Repent, You Have Displeased Allah And His Vengeance Is Nigh','Your fortune: Reply Hazy, Try Again','Your fortune: lmao you just lost 100 dramacoin','Your fortune: Yikes π¬','Your fortune: You Will Be Blessed With Many Black Bulls','Your fortune: NEETmax, The Day Is Lost If You Venture Outside','Your fortune: A Taste Of Jannah Awaits You Today','Your fortune: Watch Your Back')
+FORTUNE_REPLIES = ('Your fortune: Allah Wills It','Your fortune: Inshallah, Only Good Things Shall Come To Pass','Your fortune: Allah Smiles At You This Day','Your fortune: Your Bussy Is In For A Blasting','Your fortune: You Will Be Propositioned By A High-Tier Twink','Your fortune: Repent, You Have Displeased Allah And His Vengeance Is Nigh','Your fortune: Reply Hazy, Try Again','Your fortune: lmao you just lost 100 dramacoin','Your fortune: Yikes π¬','Your fortune: You Will Be Blessed With Many Black Bulls','Your fortune: NEETmax, The Day Is Lost If You Venture Outside','Your fortune: A Taste Of Jannah Awaits You Today','Your fortune: Watch Your Back','Your fortune: Outlook good','Your fortune: Godly Luck','Your fortune: Good Luck','Your fortune: Bad Luck','Your fortune: Good news will come to you by mail','Your fortune: Very Bad Luck','Your fortune: Reply hazy, try again','Your fortune: ο½·οΎββββββ(οΎβοΎ)ββββββ !!!!','Your fortune: Better not tell you now','Your fortune: You will meet a dark handsome stranger','Your fortune: οΌγΒ΄_γ`οΌοΎο½°οΎ','Your fortune: Excellent Luck','Your fortune: Average Luck')
diff --git a/files/routes/comments.py b/files/routes/comments.py
index 04b152fba..1251bd773 100644
--- a/files/routes/comments.py
+++ b/files/routes/comments.py
@@ -48,6 +48,8 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
if comment.post and comment.post.club and not (v and (v.paid_dues or v.id in [comment.author_id, comment.post.author_id])): abort(403)
+ if comment.post and comment.post.private and not (v and (v.admin_level > 1 or v.id == comment.post.author.id)): abort(403)
+
if not comment.parent_submission and not (v and (comment.author.id == v.id or comment.sentto == v.id)) and not (v and v.admin_level > 1) : abort(403)
if not pid:
diff --git a/files/routes/users.py b/files/routes/users.py
index 4c4caa06b..654a65f00 100644
--- a/files/routes/users.py
+++ b/files/routes/users.py
@@ -534,35 +534,36 @@ def messagereply(v):
g.db.add(new_comment)
g.db.flush()
- if PUSHER_ID and user_id != v.id:
+ if user_id != v.id:
notif = Notification(comment_id=new_comment.id, user_id=user_id)
g.db.add(notif)
- if len(message) > 500: notifbody = message[:500] + '...'
- else: notifbody = message
-
- beams_client.publish_to_interests(
- interests=[f'{request.host}{user_id}'],
- publish_body={
- 'web': {
- 'notification': {
- 'title': f'New message from @{v.username}',
- 'body': notifbody,
- 'deep_link': f'{SITE_FULL}/notifications?messages=true',
- 'icon': f'{SITE_FULL}/assets/images/{SITE_NAME}/icon.webp',
+ if PUSHER_ID:
+ if len(message) > 500: notifbody = message[:500] + '...'
+ else: notifbody = message
+
+ beams_client.publish_to_interests(
+ interests=[f'{request.host}{user_id}'],
+ publish_body={
+ 'web': {
+ 'notification': {
+ 'title': f'New message from @{v.username}',
+ 'body': notifbody,
+ 'deep_link': f'{SITE_FULL}/notifications?messages=true',
+ 'icon': f'{SITE_FULL}/assets/images/{SITE_NAME}/icon.webp',
+ }
+ },
+ 'fcm': {
+ 'notification': {
+ 'title': f'New message from @{v.username}',
+ 'body': notifbody,
+ },
+ 'data': {
+ 'url': '/notifications?messages=true',
+ }
}
},
- 'fcm': {
- 'notification': {
- 'title': f'New message from @{v.username}',
- 'body': notifbody,
- },
- 'data': {
- 'url': '/notifications?messages=true',
- }
- }
- },
- )
+ )
if new_comment.top_comment.sentto == 0: