kordophone: add support for /messages
This commit is contained in:
@@ -2,6 +2,10 @@ use serde::Deserialize;
|
||||
use time::OffsetDateTime;
|
||||
use uuid::Uuid;
|
||||
|
||||
use super::Identifiable;
|
||||
|
||||
pub type ConversationID = <Conversation as Identifiable>::ID;
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct Conversation {
|
||||
pub guid: String,
|
||||
@@ -28,6 +32,14 @@ impl Conversation {
|
||||
}
|
||||
}
|
||||
|
||||
impl Identifiable for Conversation {
|
||||
type ID = String;
|
||||
|
||||
fn id(&self) -> &Self::ID {
|
||||
&self.guid
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct ConversationBuilder {
|
||||
guid: Option<String>,
|
||||
|
||||
Reference in New Issue
Block a user