kpcli: db: add support for printing messages table
This commit is contained in:
@@ -55,6 +55,17 @@ impl From<kordophone::model::Message> for PrintableMessage {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<kordophone_db::models::Message> for PrintableMessage {
|
||||
fn from(value: kordophone_db::models::Message) -> Self {
|
||||
Self {
|
||||
guid: value.id,
|
||||
date: OffsetDateTime::from_unix_timestamp(value.date.and_utc().timestamp()).unwrap(),
|
||||
sender: value.sender.display_name(),
|
||||
text: value.text,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ConversationPrinter<'a> {
|
||||
doc: RcDoc<'a, PrintableConversation>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user