Open MISTikus opened 6 years ago
By the way, slack ignore Fallback if Pretext is set:
Кстати, слак игнорирует поле Fallback, если Pretext заполнен:
Hi! Thanks for the feedback. Yes, I know, current solution isn't perfect. The reason behind fallback-priority is that pretext usually contains markdown(with a different than TG syntax), while fallback is the same but cleartext.
So if I will concat pretext&fallback most users who use this bot as a slack-compatible webhook will see duplicated text in their messages.. In order to make the pretext key priority, bot should convert/escape Slack Markdown.
BTW ideally service should pass TitleLink&Title keys in webhook. This is the standart way to pass the link to Slack. I understand that there is nothing you could do to fix this...
Hm.. In fact I have the builtin fixer for the non-valid Markdown. So maybe I can use the Pretext if it is set. I will make some tests to ensure this will not affect users and will come ping here
@requilence, any updates? my boss don`t want to look at informer without correct link)))
Hi! My TFS-service has default slack integration, it has no "Text" attribute, only Pretext and Fallback, and the most important information (link to Pull-Request) contained in Pretext, but bot logic is:
Can you make this fields concatenated, instead of overwriting?
TFS-generated payload:
Теперь по-русски, а то может быть не понятно что я имел в виду)
Роман, доброго времени!
Суть такая: в ТФСе есть стандартная интеграция по протоколу слака, в которую я указал хук на Horn. В этой интеграции прописан шаблон сообщения в котором указываются поля Pretext и Fallback. Самой важной информацией, по факту, является ссылка на Пулл-Реквест, при этом в коде бота поле Pretext пеертирается значением поля Fallback, соответственно ссылку мы теряем и не можем напрямую перейти из телеграмма на Пулл-реквест.
Заставить ТФС писать хук так как мне надо я не могу, т.к. шаблон сообщения не меняется.
Можно ли сделать конкатенацию этих полей, вместо того, чтобы затирать одним другое? Заранее благодарен за ответ!