Skip to content

A platform for community discussion. Free, open, simple.

FIX: Ensure push_url exists before making push notification API call

Penar Musaraj77643931bcf8
diff --git a/app/jobs/regular/push_notification.rb b/app/jobs/regular/push_notification.rb
index a03da1373c6..415152422e7 100644
--- a/app/jobs/regular/push_notification.rb
+++ b/app/jobs/regular/push_notification.rb
@@ -20,6 +20,8 @@ module Jobs
notification.merge(client_id: client_id)
end
+ next unless push_url
+
result = Excon.post(push_url,
body: payload.merge(notifications: notifications).to_json,
headers: { 'Content-Type' => 'application/json', 'Accept' => 'application/json' }