aboutsummaryrefslogtreecommitdiff
path: root/matrix
diff options
context:
space:
mode:
Diffstat (limited to 'matrix')
-rw-r--r--matrix/matrix.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go
index 940a519..8cf2e96 100644
--- a/matrix/matrix.go
+++ b/matrix/matrix.go
@@ -729,17 +729,10 @@ func (c *Container) MarkRead(roomID, eventID string) {
_, _ = c.client.MakeRequest("POST", urlPath, struct{}{}, nil)
}
-var mentionRegex = regexp.MustCompile("\\[(.+?)]\\(https://matrix.to/#/@.+?:.+?\\)")
-var roomRegex = regexp.MustCompile("\\[.+?]\\(https://matrix.to/#/(#.+?:[^/]+?)\\)")
-
func (c *Container) PrepareMarkdownMessage(roomID string, msgtype mautrix.MessageType, text string, rel *ifc.Relation) *event.Event {
content := format.RenderMarkdown(text)
content.MsgType = msgtype
- // Remove markdown link stuff from plaintext mentions and room links
- content.Body = mentionRegex.ReplaceAllString(content.Body, "$1")
- content.Body = roomRegex.ReplaceAllString(content.Body, "$1")
-
if rel != nil && rel.Type == mautrix.RelReplace {
contentCopy := content
content.NewContent = &contentCopy