Skip to content

Commit

Permalink
Add emoji conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
mszostok committed Mar 12, 2024
1 parent 2e1e4c5 commit 827f68c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/bot/interactive/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (h *HelpMessage) Build(init bool) CoreMessage {
msg := CoreMessage{}

if init {
msg.Header = fmt.Sprintf(":rocket: Botkube instance %q is now active.", h.clusterName)
msg.Header = fmt.Sprintf("🚀 Botkube instance %q is now active.", h.clusterName)
}

type getter func() []api.Section
Expand Down
8 changes: 7 additions & 1 deletion test/commplatform/slack_tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ func sPrintBlocks(blocks []slack.Block) string {
}
}
builder.WriteString("::::")
return builder.String()
return replaceEmojiWithTags(builder.String())
}

func (s *SlackTester) WaitForLastInteractiveMessagePostedEqual(userID, channelID string, msg interactive.CoreMessage) error {
Expand Down Expand Up @@ -599,6 +599,12 @@ var emojiSlackMapping = map[string]string{
"🟢": ":large_green_circle:",
"💡": ":bulb:",
"❗": ":exclamation:",
"🚀": ":rocket:",
"🏁": ":checkered_flag:",
"🛠️": ":hammer_and_wrench:",
"📣": ":mega:",
"☁️": ":cloud:",
"🤖": ":robot_face:",
}

func replaceEmojiWithTags(content string) string {
Expand Down

0 comments on commit 827f68c

Please sign in to comment.