File tree Expand file tree Collapse file tree 1 file changed +2
-22
lines changed
server/src/main/java/com/objectcomputing/checkins/services/kudos Expand file tree Collapse file tree 1 file changed +2
-22
lines changed Original file line number Diff line number Diff line change 11package com .objectcomputing .checkins .services .kudos ;
22
3- import com .objectcomputing .checkins .notifications .social_media .SlackPoster ;
43import com .objectcomputing .checkins .notifications .social_media .SlackSearch ;
54import com .objectcomputing .checkins .services .kudos .kudos_recipient .KudosRecipientServices ;
65import com .objectcomputing .checkins .services .kudos .kudos_recipient .KudosRecipient ;
1413import com .slack .api .model .block .element .RichTextSectionElement ;
1514import com .slack .api .util .json .GsonFactory ;
1615import com .google .gson .Gson ;
17- import io . micronaut . core . annotation . Introspected ;
16+
1817import jakarta .inject .Singleton ;
1918
2019import 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 );
You can’t perform that action at this time.
0 commit comments