Fixup printing large messages
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
@@ -306,10 +306,7 @@ func replyWithPostMessage(finalResponse string, api *slack.Client, ev *slackeven
|
|||||||
|
|
||||||
messages := xstrings.SplitParagraph(finalResponse, 3000)
|
messages := xstrings.SplitParagraph(finalResponse, 3000)
|
||||||
|
|
||||||
for i, message := range messages {
|
for _, message := range messages {
|
||||||
if i == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
_, _, err := api.PostMessage(ev.Channel,
|
_, _, err := api.PostMessage(ev.Channel,
|
||||||
slack.MsgOptionLinkNames(true),
|
slack.MsgOptionLinkNames(true),
|
||||||
slack.MsgOptionEnableLinkUnfurl(),
|
slack.MsgOptionEnableLinkUnfurl(),
|
||||||
|
|||||||
Reference in New Issue
Block a user