Explorar o código

Fix bug in HTML parser

Tulir Asokan %!s(int64=4) %!d(string=hai) anos
pai
achega
1b1d5d9a74
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      formatting.go

+ 1 - 1
formatting.go

@@ -143,6 +143,6 @@ func (formatter *Formatter) ParseWhatsApp(content *event.MessageEventContent, me
 func (formatter *Formatter) ParseMatrix(html string) (string, []types.WhatsAppID) {
 	ctx := make(format.Context)
 	result := formatter.matrixHTMLParser.Parse(html, ctx)
-	mentionedJIDs := ctx[mentionedJIDsContextKey].([]types.WhatsAppID)
+	mentionedJIDs, _ := ctx[mentionedJIDsContextKey].([]types.WhatsAppID)
 	return result, mentionedJIDs
 }