Schema.slack.functions.SendMessage 在一定数量的字符后换行文本

问题描述 投票:0回答:0

我正在编写的 Slack 应用程序中使用 Slack

SendMessage
函数 - https://api.slack.com/reference/functions/send_message

我关注了 slack 应用程序 hello world - https://github.com/slack-samples/deno-hello-world/blob/main/functions/greeting_function.ts#L47

export default SlackFunction(
  GreetingFunctionDefinition,
  ({ inputs }) => {
    const { recipient, message } = inputs;
    const salutations = ["Hello", "Hi", "Howdy", "Hola", "Salut"];
    const salutation =
      salutations[Math.floor(Math.random() * salutations.length)];
    const greeting =
      `Long message here is getting wrapppppppppppped for no reason when plenty of space`;
    return { outputs: { greeting } };
  },

然而,即使没有换行符,并且屏幕上留有足够的空间,文本也会换行。下面的屏幕截图显示右侧有大量空白,但文本不会进入该区域。关于如何告诉 Slack 不要剪断和换行有什么想法吗?

slack slack-api
© www.soinside.com 2019 - 2024. All rights reserved.