Closed Lex45x closed 7 years ago
You can provide a string with just a space as the text field, which is then overridden by your attachments. I've done this and had no issues.
HI i just test it and its not looking as working the code is :
from slacker import Slacker
slack = Slacker(properties.slack_key) MSG = '[{title:"cnn site", title_link:"http://cnn.com"}]' slack.chat.post_message(channel='test',attachments=MSG,text=' ')
i did test full json but its not working in geting clear text in the slack
You must put a wrong-formatted attachment. If a wrong-formatted attachment sent to API, it is ignored so that the 'text' field is required. Check your attachment format and do not forget set the argument 'text' to None.
I was faced with next problem: When I try to send message with attachments and without text I'm catching exception But Slack provides sending message with empty text and attachments, as you can see picture below Hope you fix that:)