I've built a Workspace App for Slack, which now comes with a channel (under the Apps header), where a user can send messages to the app itself. This triggers a message.app_home event, that my backend receives. I want to respond to that message, using chat.postMessage, but only the message text appears in the response. None of the attachments I send along appear in the channel. Returning this structure as part of a JSON response to a Slash Command request works correctly.
Here are the attachments structure I sending along:
(
{
"title": "Create a space, optionally setting its name and adding other users",
"text": "`/luffa create [space name] [teammates]`\nExample: `/luffa create Marketing Campaign 2018 @john @kate`",
"color": SLACK_COLOR,
},
{
"title": "Start a new meeting, optionally strating it in the space matching the provided name",
"text": "`/luffa start [space name]`\nExample: `/luffa start Marketing Campaign 2018`",
"color": SLACK_COLOR,
},
{
"title": "Search Luffa",
"text": "`/luffa search [query]`\nExample: `/luffa search interviews before:Yesterday `",
"color": SLACK_COLOR,
},
{
"text": "There is more help available in our Help Center: https://help.okluffa.com/",
},
)
I am using the slackclient Python library to wrap my calls to the Slack API.
There is no error message returned and the structure seems to be correct based on the documentation. Is there something missing there?