gcm
gcm copied to clipboard
How to handel canonical registration ID's ?
There is no documentation i found on how i can remove/replace canonical registration ids. can you please help?
@UsmanMalik, it's not documented, I'm using this:
if response[:response] == 'success'
if response[:canonical_ids]
response[:canonical_ids].each do |id|
device = Device.find_by!(registration_id: id[:old])
device.update_attribute(:registration_id, id[:new])
end
end
response
else
raise ResponseError, response[:response]
end
thanks @amenzhinsky :clap:
Thanks, i will try and let you know.