Closed simonseo closed 6 years ago
@anchor14 has an idea how we should deal with this.
I think this can be done either from the database or the chatbot server, but it would be better to do it in the chatbot server since each chatbot interface (FB, Telegram, etc) have different functionalities. I'm specifically thinking about links/buttons/email address/font transform
Example:
....
"title": "\"Just Another Accent\" Movie Premier ",
"message": "<p>The Cultural Enegamnet Program is delighted to invite you to attend "<em><strong>Just Another Accent</strong></em>" movie premier. </p>
\r\n\r\n<p>A young Emirati woman uses her speech impediment as the catalyst to help others in the United Arab Emirates.<br />
\r\nThe documentary aims to raise awareness of stuttering and wipe off the stigma that has long been attached to it. The film also follows Farah Al Qaissieh’s journey in supporting the stuttering community through her non-profit organization of Stutter UAE and the features other people who stutter and the issues they face in everyday life.<br />
\r\n<br />
\r\n<strong>EVENT DETAILS:</strong><br />
\r\nDocumentary Premiere @ NYUAD<br />
\r\nReception and Panel Discussion with the lead actress<br />
\r\nThursday, 5th of April, Location: A6 - 008<br />\r\n7:00 p.m. – 8:30 p.m</p>
\r\n\r\n<p><strong>RSVP here</strong>: <a href=\"https://goo.gl/xRZupr\">https://goo.gl/xRZupr</a></p>\r\n",
"topic": "Community Life",
.....
@arantzardzm I know a library that can do this, so we can look at it together.
Flask seems to have something like this.
Search Markup class
in the above link
@simonseo We found a way to do this on the fb chatbot side. We will push it after we figure out how to send csv from flask to the fb server. (we just experimented it with chunks of html text with links and stuff in it.)
Currently, the "message" field of our CSV contains HTML-formatted content. We shouldn't pass this straight to the chatbot. We want the users to see plaintext with buttons instead of links.