Skip to content
This repository has been archived by the owner on Mar 25, 2019. It is now read-only.

How to handel canonical registration ID's ? #22

Open
UsmanMalik opened this issue Jun 20, 2015 · 3 comments
Open

How to handel canonical registration ID's ? #22

UsmanMalik opened this issue Jun 20, 2015 · 3 comments

Comments

@UsmanMalik
Copy link

There is no documentation i found on how i can remove/replace canonical registration ids.
can you please help?

@amenzhinsky
Copy link

@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

@kashif
Copy link
Contributor

kashif commented Aug 20, 2015

thanks @amenzhinsky 👏

@UsmanMalik
Copy link
Author

Thanks, i will try and let you know.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants