Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 25, 2012
Jeremiah Johnson changed the JabberIMConnection to use the resource if provided with t…
…he Jabber ID; when it is null (not provided in the Jabber ID) then a generated value is used
cd2810a
Jeremiah Johnson changed the default behavior to be consistent with the pre-resource s…
…upport: if no resource is specified then Jenkins is used
b6c96ca
11 src/main/java/hudson/plugins/jabber/im/transport/JabberIMConnection.java
View
@@ -84,6 +84,13 @@
* I.e. for 'john.doe@gmail.com' it is 'john.doe'.
*/
private final String nick;
+ /**
+ * The 'resource' part of the Jabber ID.
+ * I.e. for 'john.doe@gmail.com/Jenkins' it is 'Jenkins' or
+ * for 'john.doe@gmail.com' it is null.
+ */
+ @Nullable
+ private final String resource;
/**
* The nick name of the Jenkins bot to use in group chats.
* May be null in which case the nick is used.
@@ -131,6 +138,7 @@
this.hostnameOverride = desc.getHostname();
this.port = desc.getPort();
this.nick = JabberUtil.getUserPart(desc.getJabberId());
+ this.resource = JabberUtil.getResourcePart(desc.getJabberId());
this.passwd = desc.getPassword();
this.enableSASL = desc.isEnableSASL();
this.proxytype = desc.getProxyType();
@@ -308,7 +316,8 @@ private boolean createConnection() throws XMPPException {
}
if (this.connection.isConnected()) {
- this.connection.login(this.desc.getUserName(), this.passwd, "Jenkins");
+ this.connection.login(this.desc.getUserName(), this.passwd,
+ this.resource != null ? this.resource : "Jenkins");
setupSubscriptionMode();
createVCardIfNeeded();
4 src/main/webapp/help-id.html
View
@@ -8,5 +8,7 @@
<p>
If your XMPP server is not available via service name lookup via DNS - e.g. if you're using Google Talk and your Google address
doesn't end in @gmail.com - then you must additionally specify the XMPP server name in the Advanced section.
-
+ <p>
+ If you're re-using a user account or connecting to a server from multiple Jenkins instances then you should
+ specify a resource like <tt>jenkins@of1.jabber.org/sustaining</tt>.
</div>

No commit comments for this range

Something went wrong with that request. Please try again.