From 32a9785dd89477c8fbc577e2bc26aee4f4d8ff3a Mon Sep 17 00:00:00 2001 From: Edwin Fine Date: Thu, 10 Dec 2015 14:19:45 -0500 Subject: [PATCH] Make publishJabber treat target as group if it contains "@conference." The Jenkins plugin annotates the Targets text box as follows: "Whitespace separated list of accounts to send notifications to (like 'peter@myjabberserver.org') -- for group chats, prepend a '*' (e.g. '*commitroom@conference.myjabberserver.org') -- note that JIDs that contain '@conference.' are automatically recognized as group chats (no need to prepend '*')" This patch makes publishJabber behave as documented above. --- .../jobdsl/dsl/helpers/publisher/PublisherContext.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContext.groovy b/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContext.groovy index cdcde1bc7..2a7b7e5af 100644 --- a/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContext.groovy +++ b/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContext.groovy @@ -388,7 +388,7 @@ class PublisherContext extends AbstractExtensibleContext { publisherNodes << new NodeBuilder().'hudson.plugins.jabber.im.transport.JabberPublisher' { delegate.targets { targets.split().each { target -> - boolean isGroup = target.startsWith('*') + boolean isGroup = target.startsWith('*') || target.contains('@conference.') if (isGroup) { String targetClean = target[1..-1] 'hudson.plugins.im.GroupChatIMMessageTarget' {