Add dc_msg_get_ephemeral_{timer, timestamp}()

This commit is contained in:
Alexander Krotov
2020-07-11 00:41:55 +03:00
committed by link2xt
parent 8efe7cade7
commit 7da69a4644
5 changed files with 82 additions and 1 deletions

View File

@@ -223,7 +223,7 @@ pub struct Message {
pub(crate) timestamp_sort: i64,
pub(crate) timestamp_sent: i64,
pub(crate) timestamp_rcvd: i64,
pub(crate) ephemeral_timer: i64,
pub(crate) ephemeral_timer: u32,
pub(crate) ephemeral_timestamp: i64,
pub(crate) text: Option<String>,
pub(crate) rfc724_mid: String,
@@ -493,6 +493,14 @@ impl Message {
self.param.get_int(Param::GuaranteeE2ee).unwrap_or_default() != 0
}
pub fn get_ephemeral_timer(&self) -> u32 {
self.ephemeral_timer
}
pub fn get_ephemeral_timestamp(&self) -> i64 {
self.ephemeral_timestamp
}
pub async fn get_summary(&mut self, context: &Context, chat: Option<&Chat>) -> Lot {
let mut ret = Lot::new();