Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions src-tauri/src/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,32 +244,6 @@ impl ChatMetadata {
}
}

// Database structures for persistence
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct SlimChat {
pub id: String,
pub chat_type: ChatType,
pub participants: Vec<String>,
pub last_read: String,
pub created_at: u64,
pub metadata: ChatMetadata,
pub muted: bool,
}

impl From<&Chat> for SlimChat {
fn from(chat: &Chat) -> Self {
SlimChat {
id: chat.id.clone(),
chat_type: chat.chat_type.clone(),
participants: chat.participants.clone(),
last_read: chat.last_read.clone(),
created_at: chat.created_at,
metadata: chat.metadata.clone(),
muted: chat.muted,
}
}
}

//// Marks a specific message as read for a chat.
/// Behavior:
/// - If message_id is Some(id): set chat.last_read = id.
Expand Down
Loading