From 3658e60d89dfd9f15cb89a4ed0b8e3bda4dec551 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 1 Mar 2020 01:24:27 +0200 Subject: Update mautrix-go --- matrix/matrix.go | 7 ------- 1 file changed, 7 deletions(-) (limited to 'matrix') 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 -- cgit v1.2.3