Skip to content

Commit

Permalink
[feature] chat component can now show clickable urls
Browse files Browse the repository at this point in the history
  • Loading branch information
maeckes1 committed Jul 19, 2023
1 parent 7dbae3f commit 02cbe6c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions webapp/components/Chat/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,12 @@ export default {
this.messagesLoaded = true
}
this.messagePage += 1
// hacky way to make urls clickable for the chat component
// --> linkify in the backend is changing the syntax of the url
this.messages.forEach((msg) => {
msg.content = msg.content.replace(/<\/?a[^>]*>/g, '')
})
} catch (error) {
this.messages = []
this.$toast.error(error.message)
Expand Down

0 comments on commit 02cbe6c

Please sign in to comment.