Call EncryptMegolmEvent with pointer to content
This commit is contained in:
parent
38d5ef5603
commit
e80c972da5
@ -866,7 +866,7 @@ func (c *Container) SendEvent(evt *muksevt.Event) (id.EventID, error) {
|
|||||||
c.typing = 0
|
c.typing = 0
|
||||||
room := c.GetRoom(evt.RoomID)
|
room := c.GetRoom(evt.RoomID)
|
||||||
if room != nil && room.Encrypted && c.crypto != nil && evt.Type != event.EventReaction {
|
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 err != nil {
|
||||||
if isBadEncryptError(err) {
|
if isBadEncryptError(err) {
|
||||||
return "", err
|
return "", err
|
||||||
@ -876,7 +876,7 @@ func (c *Container) SendEvent(evt *muksevt.Event) (id.EventID, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
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 {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user