FEATURE: Do not disturb (#11484)

This commit is contained in:
Mark VanLandingham
2020-12-18 09:03:51 -06:00
committed by GitHub
parent 806f05f851
commit 649ed24bb4
33 changed files with 635 additions and 67 deletions

View File

@@ -464,6 +464,8 @@ class PostAlerter
end
def push_notification(user, payload)
return if user.do_not_disturb?
if user.push_subscriptions.exists?
Jobs.enqueue(:send_push_notification, user_id: user.id, payload: payload)
end