sylver | 27 Apr 2010 05:15
Picon

How to get "actual" resource from JID

Hi,

For login, I've set my account object like so:

account = XMPP.accounts;
account.jid = "star@.../luke";
account.password = "lucas";

But during chat session, and by looking at XMPP console, I notice that
X4M append 8 more chars to my resource, making it looking like so:

"star@.../lukeAC5D5EFA"

My question is, is there a function in X4M that returns
"lukeAC5D5EFA" ?

If not, then my next move will be to listen to an incoming message,
grab the "to" value, and then grab the resource. But that sounds quite
a lot to do :D

Any suggestion would be greatly appreciated.

Thanks :D

--

-- 
Documentation: http://github.com/bard/sameplace/wikis/home
Discussions: http://groups.google.com/group/sameplace
Bug tracker: https://bugs.launchpad.net/sameplace

(Continue reading)

Sonny Piers | 27 Apr 2010 11:41
Picon
Gravatar

Re: How to get "actual" resource from JID

I've never noticed that x4m append chars to the resource.

Maybe x4m do it because you are already connected with the resource "luke" ?

On 04/27/2010 05:15 AM, sylver wrote:
> Hi,
>
> For login, I've set my account object like so:
>
> account = XMPP.accounts;
> account.jid = "star@.../luke";
> account.password = "lucas";
>
> But during chat session, and by looking at XMPP console, I notice that
> X4M append 8 more chars to my resource, making it looking like so:
>
> "star@.../lukeAC5D5EFA"
>
> My question is, is there a function in X4M that returns
> "lukeAC5D5EFA" ?
>
> If not, then my next move will be to listen to an incoming message,
> grab the "to" value, and then grab the resource. But that sounds quite
> a lot to do :D
>
> Any suggestion would be greatly appreciated.
>
> Thanks :D
>
>    
(Continue reading)

sylver | 28 Apr 2010 04:18
Picon

Re: How to get "actual" resource from JID

Hi Sonny, Thanks for bringing that up :D

I did some testing and these are my results:

Format : <original resource> ==> <after xmpp4moz added some chars>
lu ==> lu335C6C3E
ThisResourceIsLong ==> ThisResour543A3C91
ThisResourceIsEvenLonger ==> ThisResour031D14AD
lukewarm ==> lukewarm211CE668

Another friend of mine suggested to get the "to" value, in the <iq>
roster reply stanza. I'll do that for now :D

On Apr 27, 5:41 pm, Sonny Piers <sonny.pi...@...> wrote:
> I've never noticed that x4m append chars to the resource.
>
> Maybe x4m do it because you are already connected with the resource "luke" ?
>
> On 04/27/2010 05:15 AM, sylver wrote:
>
>
>
> > Hi,
>
> > For login, I've set my account object like so:
>
> > account = XMPP.accounts;
> > account.jid = "s...@.../luke";
> > account.password = "lucas";
>
(Continue reading)


Gmane