mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
[feature] chat component can now show clickable urls
This commit is contained in:
parent
7dbae3f5c4
commit
02cbe6c19b
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user