def send_postponed(self, meeting, postponed_date, reason):
text = "There will be *no* group meeting next week (%A, %b %d, %Y)"
text = postponed_date.strftime(text) + ("%s.\n" % reason.lower())
text += "The next group meeting has been postponed to "
text += meeting.date.strftime("%A, %b %d, %Y. ")
text += "Presenters will be %s." % get_text_list(
map(unicode, meeting.presenters.all()), 'and'
)
attachments = [{
"fallback": "Go %s for detail." % _url(meeting.get_absolute_url()),
"actions": [{
"type": "button",
"text": "Detail",
"url": _url(meeting.get_absolute_url()),
}]
}]
return unicode(self("chat.postMessage",
text=text,
attachments=attachments,
icon_url=_url(static('slack/presentation.png')),
username='Meeting Bot',
))
评论列表
文章目录