aboutsummaryrefslogtreecommitdiff
path: root/matrix
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-06-18 12:57:47 +0300
committerTulir Asokan <tulir@maunium.net>2020-06-18 12:57:47 +0300
commite80c972da5ea297bc1a81520517ae1af8a4a0cf7 (patch)
tree944d99b1710c244b7df947a02fcb37a85508f454 /matrix
parent38d5ef5603bba2241ec5ccf1c86f98ec24e023d6 (diff)
Call EncryptMegolmEvent with pointer to content
Diffstat (limited to 'matrix')
-rw-r--r--matrix/matrix.go4
1 files 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
}