Skip to content

Commit 32a9785

Browse files
author
Edwin Fine
committed
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 '[email protected]') -- for group chats, prepend a '*' (e.g. '*[email protected]') -- note that JIDs that contain '@conference.' are automatically recognized as group chats (no need to prepend '*')" This patch makes publishJabber behave as documented above.
1 parent 6a7a6b4 commit 32a9785

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContext.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ class PublisherContext extends AbstractExtensibleContext {
388388
publisherNodes << new NodeBuilder().'hudson.plugins.jabber.im.transport.JabberPublisher' {
389389
delegate.targets {
390390
targets.split().each { target ->
391-
boolean isGroup = target.startsWith('*')
391+
boolean isGroup = target.startsWith('*') || target.contains('@conference.')
392392
if (isGroup) {
393393
String targetClean = target[1..-1]
394394
'hudson.plugins.im.GroupChatIMMessageTarget' {

0 commit comments

Comments
 (0)