feat: Chat request implementation #14
1 changed files with 4 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
|||
|
||||
//! Events that the client send it
|
||||
|
||||
use oxidetalis_core::types::Signature;
|
||||
use oxidetalis_core::types::{PublicKey, Signature};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{nonce::NonceCache, utils};
|
||||
|
@ -24,6 +24,7 @@ use crate::{nonce::NonceCache, utils};
|
|||
/// Client websocket event
|
||||
#[derive(Deserialize, Clone, Debug)]
|
||||
pub struct ClientEvent {
|
||||
#[serde(flatten)]
|
||||
pub event: ClientEventType,
|
||||
signature: Signature,
|
||||
}
|
||||
|
@ -36,6 +37,8 @@ pub enum ClientEventType {
|
|||
Ping { timestamp: u64 },
|
||||
/// Pong event
|
||||
Pong { timestamp: u64 },
|
||||
/// Request to chat with a user
|
||||
ChatRequest { to: PublicKey },
|
||||
}
|
||||
|
||||
impl ClientEventType {
|
||||
|
|
Loading…
Reference in a new issue