Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webex Adapter: Adding support for Markdown and set default text format to Markdown instead of plain text #482

Conversation

bastian-thiede
Copy link
Contributor

This PR addresses an issue regarding Markdown-formatted messages with the Webex adapter #479. The current implementation calls the Webex API to create messages and supplies the content always under text which will result in a plain text message. However, we can call the same method and use markdown to supply a formatted message. In this case, we can additionally provide a plain text message for clients that are not able to render Markdown utilizing MarkdownToPlaintextRenderer (see also API documentation)

Moreover, I suggest changing the default behaviour to expect Markdown-formatted messages to match the default IMessageActivity.TextFormat.

Copy link

@patatofries patatofries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my point of view a clean implementation, making the life of users of the Webex Adapter easier and more consistent with the default bot web chat!

@garypretty garypretty merged commit 6cc5217 into BotBuilderCommunity:develop May 18, 2022
garypretty added a commit that referenced this pull request Jun 9, 2022
* Swallow handoff events and suppport datetime (#404)

* Swallow handoff events and suppport datetime

Ensure handoff events handled by the handoff middleware are swallowed and not passed to the user. Update ServiceNow controller / middleware to handle datetimepicker. Update readme.

* Fix link / multi link support and add card support

* Update TokenExchangeSkillHandler tags and package info (#397)

Fixes: #396

* Added TextRecognizer middlware compoent (#402)

* Added TextRecognizer middlware compoent

* Added readme file for TextRecognizer middleware

* Updated readme.md file

* Replace with Bot_Builder_Version tag

* add it to the turn state and remove from conversation state

* Updated read.md file

* Add Sentiment Analysis Middleware Component (#400)

* chore: update the SentimentAnalyzer reference for Sentiment Analysis Middleware

* chore: add the Sentiment Analysis Middleware component

* chore: modified the description.

* Update README.md

Add all the relevant details

* chore: add solution file and fixed the null check

* chore: add it to the turn state and remove from conversation state after discussing with SDK team

Co-authored-by: Gary Pretty <gary@garypretty.co.uk>

* ServiceNow Component Updates (#407)

* Swallow handoff events and suppport datetime

Ensure handoff events handled by the handoff middleware are swallowed and not passed to the user. Update ServiceNow controller / middleware to handle datetimepicker. Update readme.

* Fix link / multi link support and add card support

* Updates for images / carousels

* Add Google Business Messaging Adapter Component (#408)

* Add Google Business Messaging Component

* Update project file and component registration

* Add package icon

* Include schemas in project

* Add incoming message validation and partnerKey property

* Change to UTF8 encoding in the body validation when requesting authorization (#439)

* StreamReader overload to specify UTF8 encoding type

StreamReader overload to UTF8 encoding type in order to have more compatibility with the character sets of other languages ​​apart from English.  
since this can generate incompatibility in certain cases such as in #435

* Change from ASCII to UTF8 encoding in _requestBodyByte

Change from ASCII to UTF8 encoding type in the body request to have more compatibility with the character sets of other languages ​​apart from English.  
since this can generate incompatibility in certain cases such as in #435

* Include gifs in cards library readme (#431)

Co-authored-by: Kyle Delaney <v-kydel@microsoft.com>

* Update cards library sample dependencies (#430)

Co-authored-by: Kyle <v-kydel@microsoft.com>

* Added null conditional operators for default case and outputText Case to handle  Null reference exception (#425)

* Resolved the issue by adding text inside the hero card, changed item.header to display title for the single link response type. (#426)

* Modifications made in the else part of picker case and boolean case  to render the text within the hero card instead of separate message. (#424)

* Limiting the number of buttons to 50  and cards to 10 that can be rendered in a Hero card carousel. (#423)

* A new response type called OutPutHTML is released in the latest build. With this release, the rich text is not shown and line breaks are missing, displays as a plain text. (#428)

* UI change to Incident card Keys/Titles like Short description  to be bold in the card response type. (#422)

* Added Multi select choice input (#420)

* Added Multi select choice input

* Create README.md

* Document has updated

* URL is not constructed properly (#427)

* Checking for the takeControl flag  along with the responseMessage.completed flag to hand over back the user to MS Bot (#421)

* Removed unnecessary param in the payload (#429)

* Removed unnecessary param in the payload

* Revert "Removed unnecessary param in the payload"

This reverts commit 4003a9f.

* Removed unnecessary param in the payload

* Fix for Ticket Details are truncating and not wrapping (#452)

Co-authored-by: Palanikumar Ravichandran <palanikumar.ravic@hcl.com>

* Update token exchange skill handler readme (#440)

* Update readme.md

* Update readme.md

* Update readme.md

Co-authored-by: Gary Pretty <gary@garypretty.co.uk>

* Expire Conversation Trigger for Bot composer (#456)

* Added expire conversation trigger

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

Co-authored-by: Gary Pretty <gary@garypretty.co.uk>

* Bump RestSharp in /libraries/Bot.Builder.Community.Adapters.Zoom (#445)

Bumps [RestSharp](https://github.com/restsharp/RestSharp) from 106.10.2-alpha.0.8 to 106.12.0.
- [Release notes](https://github.com/restsharp/RestSharp/releases)
- [Changelog](https://github.com/restsharp/RestSharp/blob/dev/releasenotes.md)
- [Commits](https://github.com/restsharp/RestSharp/commits/106.12)

---
updated-dependencies:
- dependency-name: RestSharp
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gary Pretty <gary@garypretty.co.uk>

* Added custom Bot composer dialog Inputs (#457)

* Added custom inputs

* Added custom dialog inputs

* Added custom dialog inputs

Co-authored-by: Gary Pretty <gary@garypretty.co.uk>

* Move Facebook, Slack, Twilio, Webex adapters (#461)

* Copy Facebook Adapter

* Delete schema files

* Rename project file.

* -Change namespace
-Remove unused usings
-Remove Microsoft copyright notice

* Add README, project file, update solution

* Add Slack, Twilio, Webex initial copy from MS repo

* Slack - update namespace, remove MS copyright notice, remove ununsed usings

* Twilio - update namespaces, remove MS copyright

* Webex - update namespace, remove copyright

* Remove schemas, icons

* Add fully qualified name to Schema

* Add Facebook, Slack, Twilio, Webex tests from MS repo

* Update adapters tests

* Update READMEs

* Remove old project file

* Remove old project files.

* MessageBird adapter for BotComposer (#460)

* MessageBird adapter for BotComposer

* MessageBird adapter for BotComposer

* MessageBird adapter for BotComposer

* MessageBird adapter for BotComposer

* Update BotBuilderCommunity.MessageBirdAdapter.schema

Co-authored-by: Gary Pretty <gary@garypretty.co.uk>

* Google adapter fix for Access Token (#463)

Co-authored-by: Gary Pretty <gary@garypretty.co.uk>

* MessageBird API New Request Verification Method and Breaking Changes (#467)

* #466

* switch statement added, if/else blokcs are removed.

* added caption support for MediaContent's like image, video, audio, file

* fixed some unnecessary indentations

* Changed sample , image caption and added Sample project to the solution file

* fix content type for samples

* added sample code to readme file

* more fixing readme file

* updating composer component to reflect the breaking changes of the adapter, NuGet tags and description

* reverting a tag for NuGet

* Move Samples for Facebook, Slack, Twilio, Webex adapters (#472)

* Copy Facebook Adapter

* Delete schema files

* Rename project file.

* -Change namespace
-Remove unused usings
-Remove Microsoft copyright notice

* Add README, project file, update solution

* Add Slack, Twilio, Webex initial copy from MS repo

* Slack - update namespace, remove MS copyright notice, remove ununsed usings

* Twilio - update namespaces, remove MS copyright

* Webex - update namespace, remove copyright

* Remove schemas, icons

* Add fully qualified name to Schema

* Add Facebook, Slack, Twilio, Webex tests from MS repo

* Update adapters tests

* Update READMEs

* Remove old project file

* Remove old project files.

* Add Facebook, Twilio, Slack, Webex adapter samples.

* Update namespaces, remove copyright notice, update adapter package references, update READMEs.

* Update namespaces.

* Update READMEs.

* Update test projects target framework to netcoreapp3.1.

* Bug fix for mapping of item in reaction_event (#478)

* Bug fix for mapping of item in reaction_event

* restoring message body

* minor fixe

* fixed spacing

* fixed spacing

Co-authored-by: Anshul Sharma <ansharma@linkedin.com>

* Changing encoding from ASCII to UTF8 to support extended charset (#480)

* change split character (#477)

* Webex Adapter: Adding support for Markdown and set default text format to Markdown instead of plain text (#482)

* adding reference to Bot.Builder.Community.Adapters.Share

* handling format and passing MessageTextType to CreateMessageAsync and CreateMessageWithAttachmentsAsync

* Adding support for markdown and additional plain text

* Setting default text format to markdown

* Add activity to google event for GoogleBusinessMessagingRequestMapper (#483)

* Add activity to google event mapping

* update display name

Co-authored-by: Eric Dahlvang <erdahlva@microsoft.com>
Co-authored-by: Vinoth Rajendran <r.vinoth@live.com>
Co-authored-by: Arafat Tehsin <arafattehsin@hotmail.com>
Co-authored-by: Ricardo Zamudio <46466785+JustZeus@users.noreply.github.com>
Co-authored-by: Kyle Delaney <kyle_delaney@msn.com>
Co-authored-by: Kyle Delaney <v-kydel@microsoft.com>
Co-authored-by: Amit-singh96 <85606479+Amit-singh96@users.noreply.github.com>
Co-authored-by: newlogics <30690070+newlogics@users.noreply.github.com>
Co-authored-by: Palanikumar Ravichandran <palanikumar.ravic@hcl.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Monica Rivera <44449640+mrivera-ms@users.noreply.github.com>
Co-authored-by: lauren-mills <lamil@microsoft.com>
Co-authored-by: ahmetkocadogan <ahmetkocadogan@gmail.com>
Co-authored-by: Anshul21 <anshul2117@gmail.com>
Co-authored-by: Anshul Sharma <ansharma@linkedin.com>
Co-authored-by: Bastian Thiede <34596230+bastian-thiede@users.noreply.github.com>
Co-authored-by: Zhipeng Wang <zhiwang@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants