forked from MarseyWorld/MarseyWorld
remove redundant if condition
parent
9529cbbd61
commit
2caf9a9faf
|
@ -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:
|
||||
|
|
|
@ -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] + '...'
|
||||
|
|
Loading…
Reference in New Issue