Function extract_timestamp

Source
pub fn extract_timestamp(
    event: &Raw<AnySyncTimelineEvent>,
    max_value: MilliSecondsSinceUnixEpoch,
) -> Option<MilliSecondsSinceUnixEpoch>
Expand description

Try to extract the origin_server_ts, if available.

If the value is larger than max_value, it becomes max_value. This is necessary to prevent against user-forged value pretending an event is coming from the future.