forked from rDrama/rDrama
1
0
Fork 0

remove redundant if condition

master
Aevann 2023-02-24 03:47:50 +02:00
parent 9529cbbd61
commit 2caf9a9faf
2 changed files with 3 additions and 3 deletions

View File

@ -318,7 +318,7 @@ def comment(v:User):
n = Notification(comment_id=c.id, user_id=x)
g.db.add(n)
if VAPID_PUBLIC_KEY != DEFAULT_CONFIG_VALUE and parent_user.id != v.id and not v.shadowbanned:
if parent_user.id != v.id and not v.shadowbanned:
if isinstance(parent, User):
title = f"New comment on your wall by @{c.author_name}"
else:

View File

@ -524,7 +524,7 @@ def message2(v:User, username:str):
g.db.add(notif)
if VAPID_PUBLIC_KEY != DEFAULT_CONFIG_VALUE and not v.shadowbanned:
if not v.shadowbanned:
title = f'New message from @{v.username}'
if len(message) > 500: notifbody = message[:500] + '...'
@ -594,7 +594,7 @@ def messagereply(v:User):
notif = Notification(comment_id=c.id, user_id=user_id)
g.db.add(notif)
if VAPID_PUBLIC_KEY != DEFAULT_CONFIG_VALUE and not v.shadowbanned:
if not v.shadowbanned:
title = f'New message from @{v.username}'
if len(body) > 500: notifbody = body[:500] + '...'