mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-04 22:15:44 -04:00
refactor(room): add RoomMemberWithSenderInfo struct.
This will hold the info for both the room member whose sender id was provided and the sender of the `m.room.member` event from which the `RoomMember` is built.
This commit is contained in:
committed by
Jorge Martin Espinosa
parent
68e3cdebdd
commit
69ab855efa
@@ -3829,6 +3829,17 @@ impl EventSource for &Room {
|
||||
#[error("out of range conversion attempted")]
|
||||
pub struct TryFromReportedContentScoreError(());
|
||||
|
||||
/// Contains the current user's room member info and the optional room member
|
||||
/// info of the sender of the `m.room.member` event that this info represents.
|
||||
#[derive(Debug)]
|
||||
pub struct RoomMemberWithSenderInfo {
|
||||
/// The actual room member.
|
||||
pub room_member: RoomMember,
|
||||
/// The info of the sender of the event `room_member` is based on, if
|
||||
/// available.
|
||||
pub sender_info: Option<RoomMember>,
|
||||
}
|
||||
|
||||
#[cfg(all(test, not(target_arch = "wasm32")))]
|
||||
mod tests {
|
||||
use assert_matches2::assert_matches;
|
||||
|
||||
Reference in New Issue
Block a user