forked from jmug/stoatchat
Add message edit records + work on guilds.
This commit is contained in:
@@ -1,13 +1,22 @@
|
||||
use serde::{ Deserialize, Serialize };
|
||||
use bson::{ UtcDateTime };
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct PreviousEntry {
|
||||
pub content: String,
|
||||
pub time: UtcDateTime,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct Message {
|
||||
#[serde(rename = "_id")]
|
||||
pub id: String,
|
||||
// pub nonce: String, used internally
|
||||
pub channel: String,
|
||||
pub author: String,
|
||||
|
||||
pub content: String,
|
||||
pub edited: Option<UtcDateTime>,
|
||||
pub edited: Option<UtcDateTime>,
|
||||
|
||||
pub previous_content: Option<Vec<PreviousEntry>>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user