We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4fe4a16 commit 47a8945Copy full SHA for 47a8945
1 file changed
raven/notification.py
@@ -18,6 +18,15 @@ def send_notification_for_message(message):
18
This is called in the "after_response" hook for user initiated requests.
19
"""
20
21
+ # if in developer mode or frappe.utils.get_url() is a localhost URL, then we should not send the push notification
22
+ # reason: avoid sending notifications from restored backups from local environments
23
+ if (
24
+ frappe.conf.developer_mode
25
+ or frappe.utils.get_url().startswith("http://localhost")
26
+ or frappe.utils.get_url().startswith("http://127.0.0.1")
27
+ ):
28
+ return
29
+
30
raven_settings = frappe.get_cached_doc("Raven Settings")
31
32
if raven_settings.push_notification_service == "Raven":
0 commit comments