Fix bug in HTML parser

This commit is contained in:
Tulir Asokan 2020-08-01 02:00:51 +03:00
parent 9671b6c39a
commit 1b1d5d9a74

View file

@ -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
}