From 4cf73b2d08bd50b38ca610ca67cad01958ca8577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 7 Jun 2021 17:26:56 +0200 Subject: store timestamp with messages --- mumlib/Cargo.toml | 2 +- mumlib/src/command.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'mumlib') 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), }, } -- cgit v1.2.1