From 19267cb7ac28ce51674baa9516ebb36074709d4f Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Tue, 18 May 2021 02:36:47 +0200 Subject: add ability for backend to keep track of messages --- mumlib/src/command.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mumlib/src') diff --git a/mumlib/src/command.rs b/mumlib/src/command.rs index d2e8477..de54261 100644 --- a/mumlib/src/command.rs +++ b/mumlib/src/command.rs @@ -29,6 +29,7 @@ pub enum Command { }, Status, UserVolumeSet(String, f32), + PastMessages, } #[derive(Debug, Deserialize, Serialize)] @@ -55,4 +56,7 @@ pub enum CommandResponse { Status { server_state: Server, }, + PastMessages { + messages: Vec<(String, String)>, + } } -- cgit v1.2.1 From f856694aa55672e6f2fa93fbce5d47fce2d08d1e Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Wed, 19 May 2021 00:21:01 +0200 Subject: add frontend support for sending messages --- mumlib/src/command.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mumlib/src') diff --git a/mumlib/src/command.rs b/mumlib/src/command.rs index de54261..5155aaa 100644 --- a/mumlib/src/command.rs +++ b/mumlib/src/command.rs @@ -30,6 +30,10 @@ pub enum Command { Status, UserVolumeSet(String, f32), PastMessages, + SendMessage { + message: String, + targets: Vec, + } } #[derive(Debug, Deserialize, Serialize)] @@ -60,3 +64,14 @@ pub enum CommandResponse { messages: Vec<(String, String)>, } } + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub enum MessageTarget { + Channel { + recursive: bool, + name: String, + }, + User { + name: String, + } +} -- cgit v1.2.1 From f551de2bbc5e41c5cd76e36c2b0a6f10d9b4cddf Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Wed, 19 May 2021 02:09:58 +0200 Subject: remove event_register_handler from tcp stack --- mumlib/src/command.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mumlib/src') diff --git a/mumlib/src/command.rs b/mumlib/src/command.rs index 5155aaa..4e8775f 100644 --- a/mumlib/src/command.rs +++ b/mumlib/src/command.rs @@ -29,7 +29,9 @@ pub enum Command { }, Status, UserVolumeSet(String, f32), - PastMessages, + PastMessages { + block: bool, + }, SendMessage { message: String, targets: Vec, -- cgit v1.2.1 From d6779ca065a896d329a7634d69a5f4270d829b73 Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Fri, 21 May 2021 14:53:58 +0200 Subject: rework event system to allow multiple triggers --- mumlib/src/command.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mumlib/src') diff --git a/mumlib/src/command.rs b/mumlib/src/command.rs index 4e8775f..c4fc913 100644 --- a/mumlib/src/command.rs +++ b/mumlib/src/command.rs @@ -64,6 +64,9 @@ pub enum CommandResponse { }, PastMessages { messages: Vec<(String, String)>, + }, + PastMessage { + message: (String, String), } } -- cgit v1.2.1 From aa710a3420ef4d834ee1df4099b25f3c83b9c31d Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Sat, 22 May 2021 01:27:17 +0200 Subject: rework command response mechanism --- mumlib/src/command.rs | 3 --- 1 file changed, 3 deletions(-) (limited to 'mumlib/src') diff --git a/mumlib/src/command.rs b/mumlib/src/command.rs index c4fc913..847b7fd 100644 --- a/mumlib/src/command.rs +++ b/mumlib/src/command.rs @@ -62,9 +62,6 @@ pub enum CommandResponse { Status { server_state: Server, }, - PastMessages { - messages: Vec<(String, String)>, - }, PastMessage { message: (String, String), } -- cgit v1.2.1