Skip to content

Commit 40f6318

Browse files
committed
Removed channel reference from the slack posting
1 parent 0040daa commit 40f6318

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

server/src/main/java/com/objectcomputing/checkins/services/kudos/KudosConverter.java

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.objectcomputing.checkins.services.kudos;
22

3-
import com.objectcomputing.checkins.notifications.social_media.SlackPoster;
43
import com.objectcomputing.checkins.notifications.social_media.SlackSearch;
54
import com.objectcomputing.checkins.services.kudos.kudos_recipient.KudosRecipientServices;
65
import com.objectcomputing.checkins.services.kudos.kudos_recipient.KudosRecipient;
@@ -14,7 +13,7 @@
1413
import com.slack.api.model.block.element.RichTextSectionElement;
1514
import com.slack.api.util.json.GsonFactory;
1615
import com.google.gson.Gson;
17-
import io.micronaut.core.annotation.Introspected;
16+
1817
import jakarta.inject.Singleton;
1918

2019
import java.util.UUID;
@@ -42,28 +41,9 @@ public KudosConverter(MemberProfileServices memberProfileServices,
4241
public String toSlackBlock(Kudos kudos) {
4342
// Build the message text out of the Kudos data.
4443
List<RichTextElement> content = new ArrayList<>();
45-
46-
// Look up the channel id from Slack
47-
String channelName = "kudos";
48-
String channelId = slackSearch.findChannelId(channelName);
49-
if (channelId == null) {
50-
content.add(
51-
RichTextSectionElement.Text.builder()
52-
.text("#" + channelName)
53-
.style(boldItalic())
54-
.build()
55-
);
56-
} else {
57-
content.add(
58-
RichTextSectionElement.Channel.builder()
59-
.channelId(channelId)
60-
.style(limitedBoldItalic())
61-
.build()
62-
);
63-
}
6444
content.add(
6545
RichTextSectionElement.Text.builder()
66-
.text(" from ")
46+
.text("Kudos from ")
6747
.style(boldItalic())
6848
.build()
6949
);

0 commit comments

Comments
 (0)