Merge pull request #265 from tmastny/tim/add-permalink-and-channel-id

Include channel ID and permalink in search results
This commit is contained in:
Dmitrii Korotovskii
2026-05-14 20:46:27 +02:00
committed by GitHub
+3 -1
View File
@@ -52,6 +52,7 @@ type Message struct {
ThreadTs string `json:"ThreadTs"`
Text string `json:"text"`
Time string `json:"time"`
Permalink string `json:"permalink,omitempty"`
Reactions string `json:"reactions,omitempty"`
BotName string `json:"botName,omitempty"`
FileCount int `json:"fileCount,omitempty"`
@@ -1571,9 +1572,10 @@ func (ch *ConversationsHandler) convertMessagesFromSearch(slackMessages []slack.
UserName: userName,
RealName: realName,
Text: text.ProcessText(msgText),
Channel: fmt.Sprintf("#%s", msg.Channel.Name),
Channel: fmt.Sprintf("%s (#%s)", msg.Channel.ID, msg.Channel.Name),
ThreadTs: threadTs,
Time: timestamp,
Permalink: msg.Permalink,
Reactions: "",
HasMedia: hasMedia,
})