phoebe/src/messages.rs

20 lines
421 B
Rust
Raw Normal View History

2021-09-12 02:59:13 +00:00
use serde::{Deserialize, Serialize};
use crate::message_ast::MessageContent;
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq)]
2021-09-12 02:59:13 +00:00
pub enum MessageReference {
Discord(u64, u64),
Matrix(String, String),
}
pub struct MessageAuthor {
pub display_name: String,
}
pub struct SentMessage {
pub source: MessageReference,
pub content: MessageContent,
pub author: MessageAuthor,
}