[aerogear-dev] SimplePush sync with MOz

Lucas Holmquist lholmqui at redhat.com
Wed Jul 30 11:34:53 EDT 2014


PR for this client update is now here:

https://github.com/aerogear/aerogear-js/pull/135


if peeps have time,  a review would be welcome.

looking to get this in before i update the push docs and examples for simplePush and UPS/SimplePush

-Thanks dudes

On Jul 29, 2014, at 11:59 AM, Lucas Holmquist <lholmqui at redhat.com> wrote:

> created a JIRA for it 
> 
> https://issues.jboss.org/browse/AGJS-203
> 
> 
> PR coming soon for the client code
> On Jul 29, 2014, at 10:46 AM, Daniel Bevenius <daniel.bevenius at gmail.com> wrote:
> 
>> Yeah, it looks like this is what's happening (at least looking at the server side of it that is)
>> 
>> 
>> On 29 July 2014 16:37, Lucas Holmquist <lholmqui at redhat.com> wrote:
>> 
>> On Jul 29, 2014, at 10:29 AM, Daniel Bevenius <daniel.bevenius at gmail.com> wrote:
>> 
>>> > but in our message handler, our notification that is sent back includes the channelId and version
>>> The 'Notification' section SimplePush Protocol [1] it specifies what should be returned. I'm not sure if Mozilla's server does something different of if it is the client side that does something different. 
>> 
>>  most likely it's the client side code that should be saving the pushEndpoint along with the channelID and then looking up by the channel ID, and then giving it to the user
>> 
>> this is probably what happens in the native browser code that we are trying to polyfill
>>> I'm not against changing things, but I think it makes sense for us to follow their protocol. I'll read up on the protocol and see if there is any new information that I'm not aware of. I'll take a look at their server too.  
>>> 
>>> [1] https://wiki.mozilla.org/WebAPI/SimplePush/Protocol#PushServer_-.3E_UserAgent_5
>>> 
>>> 
>>> 
>>> 
>>> On 29 July 2014 16:10, Lucas Holmquist <lholmqui at redhat.com> wrote:
>>> so this sort of relates to this thread here:
>>> 
>>> 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
>>> 
>>> 
>>> 
>>> 
>>> from https://developer.mozilla.org/en-US/docs/Web/API/Simple_Push_API#Add_the_push_message_handler
>>> Moz example
>>> 
>>> window.navigator.mozSetMessageHandler('push', function(e) {
>>>     console.log('My endpoint is ' + e.pushEndpoint);
>>>     console.log('My new version is ' +  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);
>>>     }
>>> });
>>> The notification that they send back includes the pushEndpoint and the version
>>> 
>>> Currently, when we do navigator.push.register() 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. <--- is a super easy change that sebi already did, just need to re-merge it back in
>>> 
>>> but in our message handler, our notification that is sent back includes the channelId and version
>>> 
>>> I believe the server should now be sending the pushEndpoint in the notification instead.
>>> 
>>> I'd do it myself, but you know, it's java
>>> 
>>> 
>>> _______________________________________________
>>> aerogear-dev mailing list
>>> aerogear-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>> 
>>> _______________________________________________
>>> aerogear-dev mailing list
>>> aerogear-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>> 
>> 
>> _______________________________________________
>> aerogear-dev mailing list
>> aerogear-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>> 
>> _______________________________________________
>> aerogear-dev mailing list
>> aerogear-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
> 
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20140730/d8c93954/attachment.html 


More information about the aerogear-dev mailing list