remove: Remove ServerEvent::Message event

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb 2024-07-17 21:17:54 +03:00
parent 09f90b060f
commit 8f791acd5d
Signed by: awiteb
GPG key ID: 3F6B55640AA6682F

View file

@ -51,8 +51,6 @@ pub enum ServerEventType {
Ping { timestamp: u64 }, Ping { timestamp: u64 },
/// Pong event /// Pong event
Pong { timestamp: u64 }, Pong { timestamp: u64 },
/// Message event, contain a message to the client
Message { msg: String },
/// New chat request from someone /// New chat request from someone
ChatRequest { from: PublicKey }, ChatRequest { from: PublicKey },
/// New chat request response from someone /// New chat request response from someone
@ -97,11 +95,6 @@ impl ServerEvent<Unsigned> {
}) })
} }
/// Create message event
pub fn message(msg: impl Into<String>) -> Self {
Self::new(ServerEventType::Message { msg: msg.into() })
}
/// Create chat request event /// Create chat request event
pub fn chat_request(from: &PublicKey) -> Self { pub fn chat_request(from: &PublicKey) -> Self {
Self::new(ServerEventType::ChatRequest { from: *from }) Self::new(ServerEventType::ChatRequest { from: *from })