aboutsummaryrefslogtreecommitdiffstats
path: root/mumlib
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-06-07 17:26:56 +0200
committerGustav Sörnäs <gustav@sornas.net>2021-06-07 17:30:51 +0200
commit4cf73b2d08bd50b38ca610ca67cad01958ca8577 (patch)
tree0adbbc531fd74c8551b6d5f8ae1b1d5dce30f590 /mumlib
parentbe76c2aa51733a0cf495e92659fbcbe527f41149 (diff)
downloadmum-4cf73b2d08bd50b38ca610ca67cad01958ca8577.tar.gz
store timestamp with messages
Diffstat (limited to 'mumlib')
-rw-r--r--mumlib/Cargo.toml2
-rw-r--r--mumlib/src/command.rs3
2 files changed, 3 insertions, 2 deletions
diff --git a/mumlib/Cargo.toml b/mumlib/Cargo.toml
index 5c9d4e1..5ec9365 100644
--- a/mumlib/Cargo.toml
+++ b/mumlib/Cargo.toml
@@ -13,7 +13,7 @@ readme = "../README.md"
[dependencies]
colored = "2"
-chrono = "0.4"
+chrono = { version = "0.4", features = [ "serde" ] }
dirs = "3"
fern = "0.6"
log = "0.4"
diff --git a/mumlib/src/command.rs b/mumlib/src/command.rs
index 351d7f6..27ca60c 100644
--- a/mumlib/src/command.rs
+++ b/mumlib/src/command.rs
@@ -1,5 +1,6 @@
use crate::state::{Channel, Server};
+use chrono::NaiveDateTime;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Deserialize, Serialize)]
@@ -63,7 +64,7 @@ pub enum CommandResponse {
server_state: Server,
},
PastMessage {
- message: (String, String),
+ message: (NaiveDateTime, String, String),
},
}