diff --git a/formatter_tag.go b/formatter_tag.go
index eec1545..c74e4d2 100644
--- a/formatter_tag.go
+++ b/formatter_tag.go
@@ -262,8 +262,11 @@ func (r *discordTagHTMLRenderer) renderDiscordMention(w util.BufWriter, source [
}
switch node := n.(type) {
case *astDiscordUserMention:
- puppet := node.portal.bridge.GetPuppetByID(strconv.FormatInt(node.id, 10))
- _, _ = fmt.Fprintf(w, `%s`, puppet.MXID, puppet.Name)
+ if user := node.portal.bridge.GetUserByID(strconv.FormatInt(node.id, 10)); user != nil {
+ _, _ = fmt.Fprintf(w, `%[1]s`, user.MXID)
+ } else if puppet := node.portal.bridge.GetPuppetByID(strconv.FormatInt(node.id, 10)); puppet != nil {
+ _, _ = fmt.Fprintf(w, `%s`, puppet.MXID, puppet.Name)
+ }
return
case *astDiscordRoleMention:
role := node.portal.bridge.DB.Role.GetByID(node.portal.GuildID, strconv.FormatInt(node.id, 10))