Private
Public Access
1
0

kpcli fix stage 1

This commit is contained in:
James Magahern
2025-07-31 19:19:29 -07:00
parent 8115f94121
commit 0e034898b2
2 changed files with 6 additions and 7 deletions

View File

@@ -1,8 +1,6 @@
mod client;
mod db;
mod printers;
#[cfg(target_os = "linux")]
mod daemon;
use anyhow::Result;

View File

@@ -1,4 +1,3 @@
use dbus::arg::{self, RefArg};
use kordophone::model::message::AttachmentMetadata;
use pretty::RcDoc;
use std::collections::HashMap;
@@ -44,8 +43,9 @@ impl From<kordophone_db::models::Conversation> for PrintableConversation {
}
}
impl From<arg::PropMap> for PrintableConversation {
fn from(value: arg::PropMap) -> Self {
#[cfg(target_os = "linux")]
impl From<dbus::arg::PropMap> for PrintableConversation {
fn from(value: dbus::arg::PropMap) -> Self {
Self {
guid: value.get("guid").unwrap().as_str().unwrap().to_string(),
date: OffsetDateTime::from_unix_timestamp(value.get("date").unwrap().as_i64().unwrap())
@@ -114,8 +114,9 @@ impl From<kordophone_db::models::Message> for PrintableMessage {
}
}
impl From<arg::PropMap> for PrintableMessage {
fn from(value: arg::PropMap) -> Self {
#[cfg(target_os = "linux")]
impl From<dbus::arg::PropMap> for PrintableMessage {
fn from(value: dbus::arg::PropMap) -> Self {
// Parse file transfer GUIDs from JSON if present
let file_transfer_guids = value
.get("file_transfer_guids")