Giter Club home page Giter Club logo

Comments (4)

lkorth avatar lkorth commented on July 21, 2024

I just finished adding initial support for device group messaging in f1b3161. I would appreciate it if you could test it out and provide any feedback or issues you may encounter.

from php-gcm.

vitorhorta avatar vitorhorta commented on July 21, 2024

I've just checked the code and it looks great! I couldn't test it yet but I'll do it soon (probably tomorrow) and give you a better feedback.

from php-gcm.

vitorhorta avatar vitorhorta commented on July 21, 2024

It's working great, thanks for the enhancement. I only have few questions.

1- Are you implementing the send method for group operations?
2- Shouldn't we make the SENDER_ID an attribute of the Sender class?
3- GCM sometimes returns 200 but the operation is not fully successful. For example, when we try to create a group that already exists we get a HTTP 200 code and a message: ''{"error":"notification_key already exists"}'". There are similar cases like this one. Should we catch these "errors" ?

Please let me know if you need any help with these improvements!

from php-gcm.

lkorth avatar lkorth commented on July 21, 2024
  1. Yes, the responses are different and are not parsed correctly right now. Either the send method needs to parse either possible response or there needs to be a separate send method.
  2. Yes, I think that makes more sense in the long run.
  3. I ran across this when adding support for groups, but I didn't notice that they were 200 responses. It's unfortunate that part of their API respects status codes and part of it does not. The only solution would probably be to check for the presence of the top level error key when deciding if the request was a success or not.

from php-gcm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.