Skip to content

Commit ec93ecd

Browse files
committed
Apply custom content config to notification
1 parent 809bcb4 commit ec93ecd

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/SlackNotificationListener.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ public void getFromConfig(SlackNotification slackNotification, SlackNotification
7676
slackNotification.setMaxCommitsToDisplay(myMainSettings.getMaxCommitsToDisplay());
7777
slackNotification.setMentionChannelEnabled(slackNotificationConfig.getMentionChannelEnabled());
7878
slackNotification.setMentionSlackUserEnabled(slackNotificationConfig.getMentionSlackUserEnabled());
79+
if(slackNotificationConfig.getContent().isEnabled()) {
80+
slackNotification.setBotName(slackNotificationConfig.getContent().getBotName());
81+
slackNotification.setIconUrl(slackNotificationConfig.getContent().getIconUrl());
82+
slackNotification.setMaxCommitsToDisplay(slackNotificationConfig.getContent().getMaxCommitsToDisplay());
83+
slackNotification.setShowBuildAgent(slackNotificationConfig.getContent().getShowBuildAgent());
84+
slackNotification.setShowElapsedBuildTime(slackNotificationConfig.getContent().getShowElapsedBuildTime());
85+
slackNotification.setShowCommits(slackNotificationConfig.getContent().getShowCommits());
86+
slackNotification.setShowCommitters(slackNotificationConfig.getContent().getShowCommitters());
87+
}
7988
Loggers.ACTIVITIES.debug("SlackNotificationListener :: SlackNotification proxy set to "
8089
+ slackNotification.getProxyHost() + " for " + slackNotificationConfig.getChannel());
8190
}

0 commit comments

Comments
 (0)