diff --git a/formatter_tag.go b/formatter_tag.go
index c392de1..b1744c5 100644
--- a/formatter_tag.go
+++ b/formatter_tag.go
@@ -263,9 +263,9 @@ func (r *discordTagHTMLRenderer) renderDiscordMention(w util.BufWriter, source [
switch node := n.(type) {
case *astDiscordUserMention:
if user := node.portal.bridge.GetUserByID(strconv.FormatInt(node.id, 10)); user != nil {
- _, _ = fmt.Fprintf(w, `%[1]s`, user.MXID)
+ _, _ = fmt.Fprintf(w, `%s`, user.MXID.URI().MatrixToURL(), user.MXID)
} else if puppet := node.portal.bridge.GetPuppetByID(strconv.FormatInt(node.id, 10)); puppet != nil {
- _, _ = fmt.Fprintf(w, `%s`, puppet.MXID, puppet.Name)
+ _, _ = fmt.Fprintf(w, `%s`, puppet.MXID.URI().MatrixToURL(), puppet.Name)
}
return
case *astDiscordRoleMention:
@@ -281,7 +281,7 @@ func (r *discordTagHTMLRenderer) renderDiscordMention(w util.BufWriter, source [
})
if portal != nil {
if portal.MXID != "" {
- _, _ = fmt.Fprintf(w, `%s`, portal.MXID, portal.bridge.AS.HomeserverDomain, portal.Name)
+ _, _ = fmt.Fprintf(w, `%s`, portal.MXID.URI(portal.bridge.AS.HomeserverDomain).MatrixToURL(), portal.Name)
} else {
_, _ = w.WriteString(portal.Name)
}