Skip to content

Commit

Permalink
Merge branch 'EN-8061-fix-warning-notification-job'
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-entourage committed Mar 6, 2025
2 parents 21b9ba3 + c937a96 commit 93fd848
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/jobs/notification_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ class NotificationJob
sidekiq_options :timeout => 180

def self.perform_later sender, object, content, device_token, community, extra={}, badge=nil
NotificationJob.perform_async(sender, object, content, device_token, community, extra)
NotificationJob.perform_async(sender, object, content, device_token, community, extra.to_json)
end

def perform sender, object, content, device_token, community, extra={}
def perform sender, object, content, device_token, community, extra="{}"
return if device_token.blank?
return unless user_application = UserApplication.find_by_push_token(device_token)

if user_application.android?
perform_android(sender, object, content, device_token, community, extra)
perform_android(sender, object, content, device_token, community, JSON.parse(extra))
elsif user_application.ios?
perform_ios(sender, object, content, device_token, community, extra)
perform_ios(sender, object, content, device_token, community, JSON.parse(extra))
end
end

Expand Down

0 comments on commit 93fd848

Please sign in to comment.