powered by Jive Software

Getting a user''s resources

I’‘m currently working on a Swing Applet using Smack and now I’‘m wondering whether there’‘s any way in which I can get access to all my contact’'s Resources?

Should I just send all messages to user@host or is there any way I can select on of their available resources so I can direct he message immediately to user@host/resource?

nephilim,

If a user logs-in in two clients (with different resources), then Smack will keep track of the last Presence. This means that the resource of the last login will be kept. Therefore, you will be able to send messages to user@host or to user@host/Res1 where Res1 is the last resource from where the user logged in.

However, IMO it would be great if we can track all the resources where the user is logged. Therefore, you will be able to choose to which resource you want to send a message. May be we can add this as an enhancement for the next release.

Regards,

– Gato

Thanks for the response, Gaston. I suppose this also means that I cannot get my own resources either?

nephilim,

If you want to get your resources from other clients were you have logged in then I’'m afraid the answer is no.

The same Smack enhancement will solve this issue also.

Regards,

– Gato

Thanks. That’'s what I was refering to.

If I would want to create such an extension myself to be included in the library, is there anything in particular I should know or pay attention to?

Thanks for the response, Gaston. I suppose this also

means that I cannot get my own resources either?

Actually, I don’'t believe there is any way to get your own resources.

Regards,

Matt

Actually, I don’'t believe there is any way to get

your own resources.

I’'ve been testing a bit with Psi (which I usually use) and Trillian, and I seem to get a presence when logging in with the other client.

For example, when I logged in with Trillian, Psi showed me this:

1

With jid being my JabberID of course. I suppose you can keep track of these presence packets to get your own resources?

Message was edited by: nephilim

I’‘ve tested this using a jabberd1.4 server, so it’‘s possible this isn’'t how things should be according to ietf.