<div dir="ltr">&gt; <span style="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</span><div>
<font color="#333333" face="Helvetica, arial, freesans, clean, sans-serif"><span style="font-size:15px;line-height:25.5px">The &#39;Notification&#39; section SimplePush Protocol [1] it specifies what should be returned. I&#39;m not sure if Mozilla&#39;s server does something different of if it is the client side that does something different. </span></font></div>
<div><font color="#333333" face="Helvetica, arial, freesans, clean, sans-serif"><span style="font-size:15px;line-height:25.5px">I&#39;m not against changing things, but I think it makes sense for us to follow their protocol. I&#39;ll read up on the protocol and see if there is any new information that I&#39;m not aware of. I&#39;ll take a look at their server too.  </span></font></div>
<div><font color="#333333" face="Helvetica, arial, freesans, clean, sans-serif"><span style="font-size:15px;line-height:25.5px"><br></span></font></div><div><font color="#333333" face="Helvetica, arial, freesans, clean, sans-serif"><span style="font-size:15px;line-height:25.5px">[1] <a href="https://wiki.mozilla.org/WebAPI/SimplePush/Protocol#PushServer_-.3E_UserAgent_5">https://wiki.mozilla.org/WebAPI/SimplePush/Protocol#PushServer_-.3E_UserAgent_5</a></span><br>
</font><div><font color="#333333" face="Helvetica, arial, freesans, clean, sans-serif"><span style="font-size:15px;line-height:25.5px"><br></span></font><div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 29 July 2014 16:10, Lucas Holmquist <span dir="ltr">&lt;<a href="mailto:lholmqui@redhat.com" target="_blank">lholmqui@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><h3 style="margin-bottom:15px;line-height:1.7;margin-right:0px;margin-left:0px;padding:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;margin-top:0px!important">
<span style="font-weight:normal">so this sort of relates to this thread here:</span></h3><h3 style="margin-bottom:15px;line-height:1.7;margin-right:0px;margin-left:0px;padding:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;margin-top:0px!important">
<a href="http://aerogear-dev.1069024.n5.nabble.com/aerogear-dev-Differences-between-Firefox-OS-quot-native-quot-Push-lib-and-AeroGear-s-Push-adapter-td6195.html" target="_blank">http://aerogear-dev.1069024.n5.nabble.com/aerogear-dev-Differences-between-Firefox-OS-quot-native-quot-Push-lib-and-AeroGear-s-Push-adapter-td6195.html</a></h3>
<h3 style="margin-bottom:15px;line-height:1.7;font-size:1.5em;margin-right:0px;margin-left:0px;padding:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;margin-top:0px!important"><span style="font-size:15px;line-height:25.5px"><br>
</span></h3><h3 style="margin-bottom:15px;line-height:1.7;font-size:1.5em;margin-right:0px;margin-left:0px;padding:0px;color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;margin-top:0px!important"><span style="font-size:15px;line-height:25.5px"><br>
from</span><span style="font-size:15px;line-height:25.5px"> </span><a href="https://developer.mozilla.org/en-US/docs/Web/API/Simple_Push_API#Add_the_push_message_handler" rel="noreferrer" style="font-size:15px;line-height:25.5px;color:rgb(65,131,196);text-decoration:none" target="_blank">https://developer.mozilla.org/en-US/docs/Web/API/Simple_Push_API#Add_the_push_message_handler</a><br>
Moz example</h3><pre style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:13px;margin-top:15px;margin-bottom:15px;border:1px solid rgb(221,221,221);line-height:19px;overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-wrap:normal;color:rgb(51,51,51);background-color:rgb(248,248,248)">
<code style="font-family:Consolas,&#39;Liberation Mono&#39;,Menlo,Courier,monospace;font-size:12px;margin:0px;border:none;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;padding:0px;word-wrap:normal;display:inline;line-height:inherit;background-color:transparent;background-repeat:initial initial">window.navigator.mozSetMessageHandler(&#39;push&#39;, function(e) {
    console.log(&#39;My endpoint is &#39; + e.pushEndpoint);
    console.log(&#39;My new version is &#39; +  e.version);
    //Remember that you can handle here if you have more than
    //one pushEndpoint
    if (e.pushEndpoint === emailEndpoint) {
        emailHandler(e.version);
    } else if (e.pushEndpoint === imEndpoint) {
        imHandler(e.version);
    }
});
</code></pre><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">The notification that they send back includes the pushEndpoint and the version</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">Currently, when we do <code style="font-family:Consolas,&#39;Liberation Mono&#39;,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>
<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&#39;d do it myself, but you know, it&#39;s java</p></div><br>_______________________________________________<br>

aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div>