Switched back to formatted message

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
main
Marcus Noble 7 months ago
parent b17a352d20
commit 88cbbd17fc
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78
  1. 8
      nexmo.go

@ -5,6 +5,8 @@ import (
"github.com/gofiber/fiber/v2"
"maunium.net/go/mautrix"
"maunium.net/go/mautrix/event"
"maunium.net/go/mautrix/format"
"maunium.net/go/mautrix/id"
)
@ -29,7 +31,11 @@ New Message from: %s
fmt.Println(msg)
_, err := matrixClient.SendText(id.RoomID(getRoom("pCzzyaOZfCrorkdgOR:matrix.cluster.fun")), msg)
_, err := matrixClient.SendMessageEvent(
id.RoomID(getRoom("pCzzyaOZfCrorkdgOR:matrix.cluster.fun")),
event.EventMessage,
format.RenderMarkdown(msg, true, true),
)
if err != nil {
fmt.Println("Failed sending to Matrix", err)
if httpErr, ok := err.(mautrix.HTTPError); ok {

Loading…
Cancel
Save