Closed pi-2r closed 4 weeks ago
For the record, this is already a feature in the tock-react-kit: https://github.com/theopenconversationkit/tock-react-kit/blob/a09549c94362bd66d26e4ffca266231a92555ecf/src/settings/TockSettings.tsx#L36-L41
For the record, this is already a feature in the tock-react-kit: https://github.com/theopenconversationkit/tock-react-kit/blob/a09549c94362bd66d26e4ffca266231a92555ecf/src/settings/TockSettings.tsx#L36-L41
For the record, this is also already covered in the Tock Vue Kit out of the box.
Ok I close the PR!
This pull request introduces a new feature for interpreting and wrapping URLs in messages, along with some minor refactoring. The most important changes include adding a new property to the
WebConnector
class, updating theWebMessageProcessor
to handle URL interpretation, and adding a utility function for detecting and wrapping links.Feature Enhancements:
bot/connector-web/src/main/kotlin/WebConnector.kt
: Added a new propertyinterpretLink
to theWebMessageProcessor
initialization to enable URL interpretation.bot/connector-web/src/main/kotlin/WebMessageProcessor.kt
: Updated theWebMessageProcessor
to include theinterpretLink
property and added logic to detect and wrap URLs in the text. [1] [2]Utility Functions:
shared/src/main/kotlin/Strings.kt
: Introduced a new functiondetectAndWrapLinks
to detect URLs in a string and wrap them in HTML anchor tags.Testing:
shared/src/test/kotlin/StringsTest.kt
: Added a test case to validate thedetectAndWrapLinks
function.