I've been running the echo.html example that comes with Strophe.js. When I start it up I sign in using a user I made called user1. When I click the connect button I get the following output:
Strophe is connecting.
Strophe is connected.
ECHOBOT: Send a message to 5ee09j8v8y@ubuntu/5ee09j8v8y to talk to me.
I am able to successfully test this example using the Gajim client. In Gajim I simply start a new chat using the above JID (5ee09j8v8y@ubuntu/5ee09j8v8y). When I send a message using Gajim it shows up on the echobot example and everything is hunky dory.
So here's my question, I see from this official site that the JID is in this format:
<JID> ::= [<node>"@"]<domain>["/"<resource>]
And I get that the resource is optional, and that the domain in my case above is simply my computer's name (my computer's name is ubuntu). BUT what I don't get is how the heck you get 5ee09j8v8y from the username user1.
The code inside echobot.js which prints the JID line above uses this command to get the information:
connection.jid
Which is just a Strophe.Connection Object retrieving it's JID.
So to sum all of this up, I cannot communicate from Gajim using user1@ubuntu/5ee09j8v8y
the only way it works is when I use the JID 5ee09j8v8y@ubuntu/5ee09j8v8y
. So what exactly is the node (5ee09j8v8y), how does it get mapped to the username (user1), how can I get Gajim to work with user1@ubuntu/5ee09j8v8y
instead of using 5ee09j8v8y@ubuntu/5ee09j8v8y
and at the very least can someone point me in the right direction to some documentation on this JID problem?
Note: This tutorial will explain my setup (and help others who are curious in how I set all of this up).