<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>—</div><div>Tadeas Kriz</div></div>
</div>
<br><div><div>On 23 Jul 2014, at 09:56 pm, Lucas Holmquist &lt;<a href="mailto:lholmqui@redhat.com">lholmqui@redhat.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><br></div><div>so there is this issue, &nbsp;, about not being able to delete a simplePush installation.</div><div><br></div><div>using the UPS js client, &nbsp;i registered the “deviceToken” with the push server, but when trying to use CURL or even the JS lib, &nbsp;i was getting a 404, and i noticed that it would never actually hit the server( i was in debug mode in IntelliJ )</div><div><br></div><div>this was a demo that i had working back in april&nbsp;<a href="https://github.com/lholmquist/mobileweek/blob/master/mobileweek-ffos/js/app.js#L17">https://github.com/lholmquist/mobileweek/blob/master/mobileweek-ffos/js/app.js#L17</a></div><div><br></div><div>i noticed that when i registered the deviceToken, i was doing a encodeURIComponent before sending it to the UPS.</div><div><br></div><div>i modified the UPS JS client to do it this way, and then when i tried to do the remove, &nbsp;i actually hit the breakpoints i set. &nbsp;but the server could not find the installation doing&nbsp;</div><div><br></div><div><div>Installation installation =</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; clientInstallationService.findInstallationForVariantByDeviceToken(variant.getVariantID(), token);</div></div><div><br></div><div><br></div><div>I changed the JS client to only do 1 encode instead of 2 but it still couldn’t find the installation.</div><div><br></div><div>I’m not really familiar with JPA and all that, &nbsp;so i don’t know how the query stuff works in this case</div><div><br></div><div><br></div><div>But i do think we should be encoding the deviceToken( which is the pushEndpointURL ) when registering with the UPS, or else i don’t think we can ever get access to that endpoint</div><div><br></div></div></blockquote><div><br></div><div>I’d rather not require this. I mean, if there is no other way, then yes, let’s encode, but I can’t see the reason why would that be a problem. Basically, when you put it into the JSON when registering, it’s just a string and string can have any possible character, no matter what. Then the request. When it’s encoded one time, so it can be put into the URL, it should be enough for the server to use it and to search an installation in the database.</div><div><br></div><div>Is is possible that there are some Hibernate’s restrictions for the “deviceToken” field?</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jul 14, 2014, at 9:52 AM, Lucas Holmquist &lt;<a href="mailto:lholmqui@redhat.com">lholmqui@redhat.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div><br class="Apple-interchange-newline">On Jul 11, 2014, at 6:33 AM, Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org">matzew@apache.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hey Luke,<div><br></div><div>I created this JIRA:</div><div><a href="https://issues.jboss.org/browse/AGPUSH-802">https://issues.jboss.org/browse/AGPUSH-802</a><br></div><div><br></div><div>As I plan working on&nbsp;AGPUSH-532 next week, to make sure we have the 'right' model in place for 1.0.0. I think once the server bits are merged, we should address AGPUSH-802&nbsp;</div></div></blockquote><div><br></div><div>kk</div><br><blockquote type="cite"><div dir="ltr"><div><br></div><div>-Matthias</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 10, 2014 at 5:22 PM, Lucas Holmquist<span class="Apple-converted-space">&nbsp;</span><span dir="ltr">&lt;<a href="mailto:lholmqui@redhat.com" target="_blank">lholmqui@redhat.com</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br><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;">so after testing this thing out with encodeURIComponent, &nbsp;the delete does work, &nbsp;however, &nbsp;we need to "double up" the encode.<div><br></div><div>this works:</div><div><br></div><div><a href="https://gist.github.com/lholmquist/10393357" target="_blank">https://gist.github.com/lholmquist/10393357</a></div><div><br></div><div><br></div><div>this doesn't:</div><div><br></div><div><a href="https://gist.github.com/lholmquist/10393450" target="_blank">https://gist.github.com/lholmquist/10393450</a></div><div><div class="h5"><div><br></div><div><br></div><div><br><div><div>On Apr 7, 2014, at 2:09 PM, Lucas Holmquist &lt;<a href="mailto:lholmqui@redhat.com" target="_blank">lholmqui@redhat.com</a>&gt; wrote:</div><br><blockquote type="cite"><div style="word-wrap: break-word;"><br><div><div>On Apr 7, 2014, at 12:52 PM, Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt; wrote:</div><br><blockquote type="cite">Ok,<div><br></div><div>So as token, we use the endpointURL, and on client we perform&nbsp;<span style="background-color: rgba(255, 255, 255, 0); font-size: small;">&nbsp;the&nbsp;</span><span style="background-color: rgba(255, 255, 255, 0); font-size: small;">encodeURIComponent()<span class="Apple-converted-space">&nbsp;</span></span><span style="background-color: rgba(255, 255, 255, 0); font-size: small;">function ?</span></div></blockquote><div><br></div><div>i think so( as suggested 2 months ago &nbsp;:) ) &nbsp; i just need to see how this will affect how we store stuff in LS.</div><div><br></div><div><br></div><br><blockquote type="cite"><div><span style="background-color: rgba(255, 255, 255, 0); font-size: small;"><br></span></div><div><span style="background-color: rgba(255, 255, 255, 0); font-size: small;">-Matthias<span></span></span></div><div><br>On Monday, April 7, 2014, Lucas Holmquist &lt;<a href="mailto:lholmqui@redhat.com" target="_blank">lholmqui@redhat.com</a>&gt; wrote:<br><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;">so i went back to look at what i had,<div><br></div><div><br></div><div>i don't think we need to get to complicated here,</div><div><br></div><div>reading the spec stuff, and this example</div><div><br></div><div><a href="https://wiki.mozilla.org/WebAPI/SimplePush#Client_.28WebApp.29_code" target="_blank">https://wiki.mozilla.org/WebAPI/SimplePush#Client_.28WebApp.29_code</a></div><div><br></div><div>they show sending the pushEndpoint to the "App server", &nbsp;so i think we could just use and keep it simple</div><div><br></div><div>it is also recommended that the channelID is never exposed to the application.</div><div><br></div><div><br><div><div>On Apr 1, 2014, at 3:34 PM, Lucas Holmquist &lt;<a>lholmqui@redhat.com</a>&gt; wrote:</div><br><blockquote type="cite"><div style="word-wrap: break-word;">i had something, &nbsp;now i forgot what it was, &nbsp; need to go back and check<br><div><div>On Apr 1, 2014, at 3:05 PM, Matthias Wessendorf &lt;<a>matzew@apache.org</a>&gt; wrote:</div><br><blockquote type="cite"><div dir="ltr"><br><div>On Fri, Feb 14, 2014 at 2:06 PM, Lucas Holmquist<span class="Apple-converted-space">&nbsp;</span><span dir="ltr">&lt;<a>lholmqui@redhat.com</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br><blockquote 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;">still exploring</div></blockquote><div><br></div><div>:-) any recent thoughts on 'encodeURIComponent()' ?&nbsp;</div><div>&nbsp;</div><blockquote 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;"><br><div><div>On Feb 13, 2014, at 3:39 PM, Sebastien Blanc &lt;<a>scm.blanc@gmail.com</a>&gt; wrote:</div><br><blockquote type="cite"><div dir="ltr"><br><div><br><br><div>On Wed, Feb 12, 2014 at 2:30 PM, Lucas Holmquist<span class="Apple-converted-space">&nbsp;</span><span dir="ltr">&lt;<a>lholmqui@redhat.com</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br><blockquote 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;">i might have a couple thoughts, but i need to try some things out first</div></blockquote><div><br></div><div>Any update on that or does the solution proposed by Matzew (using&nbsp;<span style="font-size: 13px; font-family: arial, sans-serif;">&nbsp;</span><span style="color: rgb(48, 57, 66); font-family: Menlo, monospace; font-size: 11px; white-space: pre-wrap;">encodeURIComponent() ) could be enough ? </span></div><blockquote 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;"><br><div><div>On Feb 12, 2014, at 3:53 AM, Sebastien Blanc &lt;<a>scm.blanc@gmail.com</a>&gt; wrote:</div><br><blockquote type="cite"><div dir="ltr"><br><div><br><br><div>On Tue, Feb 11, 2014 at 7:15 PM, Sebastien Blanc<span class="Apple-converted-space">&nbsp;</span><span dir="ltr">&lt;<a>scm.blanc@gmail.com</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br><blockquote 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 dir="ltr">Ok,<div>I've been doing some tests by using the PushEndpoint as device token. For registration it works but I just faced an issue by trying to unregister because the URL for the DELETE looks like :&nbsp;</div><div><br></div><div><a href="https://judconpush-sblanc.rhcloud.com/rest/registry/device/https://updates.push.services.mozilla.com/update/my_personnal_psuhendpoint_id" target="_blank">https://judconpush-sblanc.rhcloud.com/rest/registry/device/https://updates.push.services.mozilla.com/update/my_personnal_psuhendpoint_id</a><span class="Apple-converted-space">&nbsp;</span>[<br></div><div><br></div><div>And the REST endpoint get a bit crazy by the extra "/" present in the endpoint URL. Therefore, I think we must just use the last URL fragment as deviceToken.</div></div></blockquote><div>&nbsp;</div><div>Ok answering to myself ;) That won't work neither since if we do that UPS won't have the compllete push endpoint URL.&nbsp;</div><div>So how do we deal with that ?</div><blockquote 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;"><br><br><div>On Thu, Feb 6, 2014 at 3:27 PM, Matthias Wessendorf<span class="Apple-converted-space">&nbsp;</span><span dir="ltr">&lt;<a>matzew@apache.org</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br><blockquote 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 dir="ltr"><br><div><br><br><div>On Thu, Feb 6, 2014 at 3:11 PM, Sebastien Blanc<span dir="ltr"></span></div></div></div></blockquote></div></blockquote></div></div></div></blockquote></div></div></blockquote></div></div></div></blockquote></div></div></blockquote></div></div></blockquote></div></div></blockquote></div></div></div></blockquote></div><br><br>--<span class="Apple-converted-space">&nbsp;</span><br>Sent from Gmail Mobile<br>_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">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></blockquote></div><br></div>_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">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></blockquote></div><br></div></div></div></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><br clear="all"><div><br></div>--<span class="Apple-converted-space">&nbsp;</span><br>Matthias Wessendorf<span class="Apple-converted-space">&nbsp;</span><br><br>blog:<span class="Apple-converted-space">&nbsp;</span><a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions:<span class="Apple-converted-space">&nbsp;</span><a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter:<span class="Apple-converted-space">&nbsp;</span><a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div>_______________________________________________<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">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></blockquote></div><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">aerogear-dev mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a href="mailto:aerogear-dev@lists.jboss.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">aerogear-dev@lists.jboss.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></blockquote></div><br></div>_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/aerogear-dev</blockquote></div><br></body></html>