FIX: handle missing users when sending push notifications
This commit is contained in:
parent
17a7bb8e23
commit
238a13643d
|
@ -1,8 +1,8 @@
|
||||||
module Jobs
|
module Jobs
|
||||||
class SendPushNotification < Jobs::Base
|
class SendPushNotification < Jobs::Base
|
||||||
def execute(args)
|
def execute(args)
|
||||||
user = User.find(args[:user_id])
|
user = User.find_by(id: args[:user_id])
|
||||||
PushNotificationPusher.push(user, args[:payload])
|
PushNotificationPusher.push(user, args[:payload]) if user
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue