Commit 8def2ba4 by 万从磊

Merge branch 'fix_push_v2' into 'master'

推送判断client_id

See merge request !10
parents d50f3f68 63880dad
......@@ -27,8 +27,10 @@ class PushsController < ApplicationController
user_ids = params[:user_ids] rescue []
user_device_exist = UserDevice.where(user_id: user_ids).exists?
user_devices = UserDevice.where(user_id: user_ids)
client_id = message.dig('transmission_content', 'extras', 'extra', 'client_id')
user_devices = user_devices.where.not(client_id: client_id) if client_id
user_device_exist = user_devices.exists?
unless user_device_exist
return render json: { code: -1, message: 'user_device找不到,user_ids错误'}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment