File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -714,10 +714,10 @@ impl OlmMachine {
714
714
room_id : & RoomId ,
715
715
content : impl MessageEventContent ,
716
716
) -> MegolmResult < RoomEncryptedEventContent > {
717
- let event_type = content. event_type ( ) . to_owned ( ) ;
718
- let content = serde_json:: to_value ( content) ?;
717
+ let event_type = content. event_type ( ) ;
718
+ let content = serde_json:: to_value ( & content) ?;
719
719
720
- self . group_session_manager . encrypt ( room_id, content, & event_type) . await
720
+ self . group_session_manager . encrypt ( room_id, content, event_type) . await
721
721
}
722
722
723
723
/// Encrypt a json [`Value`] content for the given room.
Original file line number Diff line number Diff line change @@ -465,10 +465,10 @@ impl Joined {
465
465
content : impl MessageEventContent ,
466
466
txn_id : Option < Uuid > ,
467
467
) -> Result < send_message_event:: Response > {
468
- let event_type = content. event_type ( ) . to_owned ( ) ;
469
- let content = serde_json:: to_value ( content) ?;
468
+ let event_type = content. event_type ( ) ;
469
+ let content = serde_json:: to_value ( & content) ?;
470
470
471
- self . send_raw ( content, & event_type, txn_id) . await
471
+ self . send_raw ( content, event_type, txn_id) . await
472
472
}
473
473
474
474
/// Send a room message to this room from a json `Value`.
You can’t perform that action at this time.
0 commit comments