Implement chatlist.to_json() method and chat.get_lastmsg_id()

This commit is contained in:
jikstra
2020-01-14 09:11:32 +01:00
parent a3f2088046
commit c7958cbdba
3 changed files with 45 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ use crate::param::*;
use crate::pgp::*;
use crate::sql;
use crate::stock::StockMessage;
use serde::{Deserialize, Serialize};
// In practice, the user additionally cuts the string themselves
// pixel-accurate.
@@ -29,7 +30,7 @@ const SUMMARY_CHARACTERS: usize = 160;
/// Some message IDs are reserved to identify special message types.
/// This type can represent both the special as well as normal
/// messages.
#[derive(Debug, Copy, Clone, Default, PartialEq, Eq)]
#[derive(Debug, Copy, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub struct MsgId(u32);
impl MsgId {