Skip to content

Commit

Permalink
Fix uploading file to thread (#1016)
Browse files Browse the repository at this point in the history
  • Loading branch information
timja authored Oct 7, 2024
1 parent bf407e1 commit 2e44153
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,10 @@ public long getRetryInterval() {
}

public static String getChannelId(String botUserToken, String channel) throws ExecutionException, InterruptedException, AbortException {
if (channel.matches("^(C[A-Z0-9]{8}|G[A-Z0-9]{10}||D[A-Z0-9]{8})$")) {
return channel;
}

String channelName = cleanChannelName(channel);
if (channelName.matches("^(C[A-Z0-9]{8}|C[A-Z0-9]{10}|G[A-Z0-9]{10}|D[A-Z0-9]{8})$")) {

Check warning on line 77 in src/main/java/jenkins/plugins/slack/cache/SlackChannelIdCache.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 77 is only partially covered, one branch is missing
return channelName;

Check warning on line 78 in src/main/java/jenkins/plugins/slack/cache/SlackChannelIdCache.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 78 is not covered by tests
}

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

0 comments on commit 2e44153

Please sign in to comment.