nyaruka / courier

Messaging gateway for RapidPro/TextIt.
Other
116 stars 69 forks source link

Support MarkdownV2 text formatting styles #684

Closed norkans7 closed 9 months ago

norkans7 commented 9 months ago

Add support for formatting options https://core.telegram.org/bots/api#formatting-options

As that is not exactly how other channels such as WhatsApp do that https://faq.whatsapp.com/539178204879377/

I think the user will be responsible to make sure the text will be formatted properly for each channel type

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (870490d) 74.50% compared to head (dd65617) 74.50%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #684 +/- ## ======================================= Coverage 74.50% 74.50% ======================================= Files 98 98 Lines 13021 13022 +1 ======================================= + Hits 9701 9702 +1 Misses 2634 2634 Partials 686 686 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rowanseymour commented 9 months ago

I just tested this an my flows are broken because they use !... I think I need to revert this.

We want as much as possible to allow users to create the same messages across different channels. Maybe there's a way to let users format with the very basic _hello_ *hello* syntax (that conveniently WhatsApp uses).. and convert that where needed in channel handlers. @ericnewcomer

norkans7 commented 9 months ago

I had thought the user will be splitting by channel when they want to use that formatting

norkans7 commented 9 months ago

Or then support the old Markdown style only https://core.telegram.org/bots/api#markdown-style