<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 2014/7/30 1:16 AM, Matthias
      Wessendorf wrote:<br>
    </div>
    <blockquote
cite="mid:CAAg5f2SGPusHP20+sHscfDDRk2FsD=QqWAsKeqYAemih98evqA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Using the little hack, I am not seeing the
        pushEndpoint being returned by their server:
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div><a moz-do-not-send="true"
                href="https://gist.github.com/matzew/cbda360d72eaaef75971">https://gist.github.com/matzew/cbda360d72eaaef75971</a><br>
            </div>
            <div><br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    Registration messages carry the pushEndpoint, which is supposed to
    go to the App.<br>
    Actual Push Notifications don't have the pushEndpoint. The Client
    (the bit of SimplePush that the Apps talk to), maps the ChannelID to
    the App that requested it and fires the event when it gets an
    update. <br>
    <blockquote
cite="mid:CAAg5f2SGPusHP20+sHscfDDRk2FsD=QqWAsKeqYAemih98evqA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
              <div style="word-wrap:break-word">
                <p style="margin:15px
0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25.5px">Currently,
                  when we do <code
                    style="font-family:Consolas,'Liberation
                    Mono',Menlo,Courier,monospace;font-size:12px;margin:0px;border:1px
                    solid
rgb(221,221,221);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;padding:0px;background-color:rgb(248,248,248)">navigator.push.register()</code> the
                  result we send back is an object that includes the
                  pushEndpoint, this is actually changing to be more in
                  line with Mozilla. Instead of the object being sent
                  back, we will send back the pushEndpoint as a String.
                  &lt;--- is a super easy change that sebi already did,
                  just need to re-merge it back in</p>
                <p style="margin:15px
0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25.5px">but
                  in our message handler, our notification that is sent
                  back includes the channelId and version</p>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>here is, the JSON I receive w/ the above hack:</div>
            <div><span
style="color:rgb(48,57,66);font-family:Menlo,monospace;font-size:11px;white-space:pre-wrap">{"messageType":"notification","updates":[{"channelID":"d9b74644-4f97-46aa-b8fa-9393985cd6cd","version":3}]}
              </span><br>
            </div>
            <div><br>
            </div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
              <div style="word-wrap:break-word">
                <p style="margin:15px
0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25.5px">I
                  believe the server should now be sending the
                  pushEndpoint in the notification instead.</p>
                <p style="margin:15px
0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:15px;line-height:25.5px">I'd
                  do it myself, but you know, it's java</p>
              </div>
              <br>
              _______________________________________________<br>
              aerogear-dev mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
              <a moz-do-not-send="true"
                href="https://lists.jboss.org/mailman/listinfo/aerogear-dev"
                target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          Matthias Wessendorf <br>
          <br>
          blog: <a moz-do-not-send="true"
            href="http://matthiaswessendorf.wordpress.com/"
            target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
          sessions: <a moz-do-not-send="true"
            href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
          twitter: <a moz-do-not-send="true"
            href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
aerogear-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/aerogear-dev">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>