censor push notifs to prevent irl embarrassment
parent
96457e4998
commit
d18c3ae86a
|
@ -201,6 +201,8 @@ def push_notif(uids, title, body, url_or_comment):
|
|||
if len(body) > PUSH_NOTIF_LIMIT:
|
||||
body = body[:PUSH_NOTIF_LIMIT] + "..."
|
||||
|
||||
body = censor_slurs(body, None)
|
||||
|
||||
subscriptions = g.db.query(PushSubscription.subscription_json).filter(PushSubscription.user_id.in_(uids)).all()
|
||||
subscriptions = [x[0] for x in subscriptions]
|
||||
g.db.flush()
|
||||
|
|
Loading…
Reference in New Issue