Skip to content

Commit 2e44153

Browse files
authored
Fix uploading file to thread (#1016)
1 parent bf407e1 commit 2e44153

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/java/jenkins/plugins/slack/cache/SlackChannelIdCache.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,10 @@ public long getRetryInterval() {
7373
}
7474

7575
public static String getChannelId(String botUserToken, String channel) throws ExecutionException, InterruptedException, AbortException {
76-
if (channel.matches("^(C[A-Z0-9]{8}|G[A-Z0-9]{10}||D[A-Z0-9]{8})$")) {
77-
return channel;
78-
}
79-
8076
String channelName = cleanChannelName(channel);
77+
if (channelName.matches("^(C[A-Z0-9]{8}|C[A-Z0-9]{10}|G[A-Z0-9]{10}|D[A-Z0-9]{8})$")) {
78+
return channelName;
79+
}
8180

8281
Map<String, String> channelNameToIdMap = CHANNEL_METADATA_CACHE.get(botUserToken);
8382
String channelId = channelNameToIdMap.get(channelName);

0 commit comments

Comments
 (0)