mod friend;
pub use friend::*;
mod group;
pub use group::*;
use super::EventBase;
use strum::{Display, EnumString, IntoStaticStr};
#[derive(Debug, Clone, EnumString, Display, IntoStaticStr)]
pub enum RequestSubEvent {
#[strum(serialize = "privateApply")]
PrivateApply,
#[strum(serialize = "groupApply")]
GroupApply,
#[strum(serialize = "groupInvite")]
GroupInvite,
}
#[derive(Debug, Clone)]
pub enum RequestEvent {
PrivateApply(PrivateApply),
GroupApply(GroupApply),
GroupInvite(GroupInvite),
}
pub trait RequestBase: Send + Sync + EventBase {
type Content;
fn notion(&self) -> &str;
fn content(&self) -> Self::Content;
}
#[derive(Debug, Clone)]
pub struct RequestBuilder<Contact, Sender> {
pub event_id: String,
pub time: u64,
pub self_id: String,
pub user_id: String,
pub contact: Contact,
pub sender: Sender,
}