From e80c972da5ea297bc1a81520517ae1af8a4a0cf7 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 18 Jun 2020 12:57:47 +0300 Subject: [PATCH] Call EncryptMegolmEvent with pointer to content --- matrix/matrix.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matrix/matrix.go b/matrix/matrix.go index a199dc5..0553910 100644 --- a/matrix/matrix.go +++ b/matrix/matrix.go @@ -866,7 +866,7 @@ func (c *Container) SendEvent(evt *muksevt.Event) (id.EventID, error) { c.typing = 0 room := c.GetRoom(evt.RoomID) if room != nil && room.Encrypted && c.crypto != nil && evt.Type != event.EventReaction { - encrypted, err := c.crypto.EncryptMegolmEvent(evt.RoomID, evt.Type, evt.Content) + encrypted, err := c.crypto.EncryptMegolmEvent(evt.RoomID, evt.Type, &evt.Content) if err != nil { if isBadEncryptError(err) { return "", err @@ -876,7 +876,7 @@ func (c *Container) SendEvent(evt *muksevt.Event) (id.EventID, error) { if err != nil { return "", err } - encrypted, err = c.crypto.EncryptMegolmEvent(evt.RoomID, evt.Type, evt.Content) + encrypted, err = c.crypto.EncryptMegolmEvent(evt.RoomID, evt.Type, &evt.Content) if err != nil { return "", err }