Giter Site home page Giter Site logo

gcm's People

Contributors

apognu avatar soygul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gcm's Issues

Vendor deps and move the new home

We don't want to maintain an XMPP lib and GCM implementation ourselves so it's better to use something else (plain HTTPS with batching even).

message_status sometimes received, sometimes not..

Hi,

Thanks for this great library.

I have issue, that sometimes i receive delivery status from device, and sometimes not. My request is:

fcmMsg := &ccs.OutMsg{
To: deviceID,
Priority: "high",
DeliveryReceiptRequested: true,
DelayWhileIdle: true,
Data: data,
}

data is map[string]string.

Any known issue about this?

XMPP lib cannot handle stanza error responses

When we get following in response to a message with broken stanza (as described here: https://developer.android.com/google/gcm/ccs.html#stanza):

<message id="3" type="error" to="[email protected]/ABC">
  <gcm xmlns="google:mobile:data">
     {"random": "text"}
  </gcm>
  <error code="400" type="modify">
    <bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
    <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">
      InvalidJson: JSON_PARSING_ERROR : Missing Required Field: message_id\n
    </text>
  </error>
</message>

The resulting output is:
&{XMLName:{Space:jabber:client Local:message} From: ID: To:[email protected]/... Type:error Subject: Body: Thread: Other:[ ]}

We should instead get our broken request:

  <gcm xmlns="google:mobile:data">
     {"random": "text"}
  </gcm>

and the error details back in Other:[] array.

Use specific error types

Use error types specific to a given error along with extra info fields (maybe not? and simply favor simplicity). Either way, return type should always be error in method signature as advised in Effective Go.

Receive() should return the message for further processing

Hi,

Currently, the message ID is generated when the message is sent, and we have no way of getting it before it gets across the wire.

I want to track my message delivery status and need a way to match an ACK to a sent message. Storing the message ID when it is crafted would allow me to do just that.

I can develop it myself and make a PR if necessary.

Regards,

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.