events: Remove created_ts from call::member::MembershipInit
This commit is contained in:
parent
7567fd63b5
commit
b2f977303f
@ -176,12 +176,6 @@ pub struct MembershipInit {
|
|||||||
/// `MIN(content.created_ts, event.origin_server_ts)`
|
/// `MIN(content.created_ts, event.origin_server_ts)`
|
||||||
pub expires: Duration,
|
pub expires: Duration,
|
||||||
|
|
||||||
/// Stores a copy of the `origin_server_ts` of the initial session event.
|
|
||||||
///
|
|
||||||
/// If the membership is updated this field will be used to track to
|
|
||||||
/// original `origin_server_ts`.
|
|
||||||
pub created_ts: Option<MilliSecondsSinceUnixEpoch>,
|
|
||||||
|
|
||||||
/// A list of the focuses (foci) in use for this membership.
|
/// A list of the focuses (foci) in use for this membership.
|
||||||
pub foci_active: Vec<Focus>,
|
pub foci_active: Vec<Focus>,
|
||||||
|
|
||||||
@ -195,15 +189,8 @@ pub struct MembershipInit {
|
|||||||
|
|
||||||
impl From<MembershipInit> for Membership {
|
impl From<MembershipInit> for Membership {
|
||||||
fn from(init: MembershipInit) -> Self {
|
fn from(init: MembershipInit) -> Self {
|
||||||
let MembershipInit {
|
let MembershipInit { application, device_id, expires, foci_active, membership_id } = init;
|
||||||
application,
|
Self { application, device_id, expires, created_ts: None, foci_active, membership_id }
|
||||||
device_id,
|
|
||||||
expires,
|
|
||||||
created_ts,
|
|
||||||
foci_active,
|
|
||||||
membership_id,
|
|
||||||
} = init;
|
|
||||||
Self { application, device_id, expires, created_ts, foci_active, membership_id }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user