You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I, [2015-06-17T13:47:18.870459 #9008] INFO -- : post https://api.parse.com/1/push
I, [2015-06-17T13:47:19.329457 #9008] INFO -- Status: 400
Parse::ParseProtocolError: 115: Can't set channels for a query-targeted push.
from /opt/boxen/rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/bundler/gems/parse-ruby-client-cac04938900c/lib/faraday/extended_parse_json.rb:25:in `process_response'
This works fine:
push=parse.push({alert: 'Hello.'},'user_e3929e0df56e163acc3072df2b2748')# Don't set the typepush.save
Response:
I, [2015-06-17T13:53:29.577909 #9008] INFO -- : post https://api.parse.com/1/push
I, [2015-06-17T13:53:30.024296 #9008] INFO -- Status: 200
=> {"result"=>true}
Sorry, but what am I missing, or this a bug?
The text was updated successfully, but these errors were encountered:
@jasonschock that's because you can't set the channel and the device type at the same time. See https://parse.com/questions/cant-set-channels-for-a-query-targeted-push - According to Parse you can either set a channel with the second argument as you did or set the device type (which act as a filter). If you want to set a channel AND the device type you have to use two strategies as the current library API goes:
1 - set push.channels instead of push.channel (it's confusing I know)
Though I think like this it will send the push only to the devices that have only that channels set and not the devices that have that channels and optionally others.
Just attempting a simple push via Parse. This is almost straight from the README.
Gemfile:
gem 'parse-ruby-client', git: 'git://github.com/adelevie/parse-ruby-client.git'
Commit SHA is
cac0493
.This returns an error:
Response:
This works fine:
Response:
Sorry, but what am I missing, or this a bug?
The text was updated successfully, but these errors were encountered: