You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lemmy/crates/api_common/src/websocket/structs.rs

44 lines
948 B
Rust

use crate::sensitive::Sensitive;
use lemmy_db_schema::newtypes::{CommunityId, PostId};
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct UserJoin {
pub auth: Sensitive<String>,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct UserJoinResponse {
pub joined: bool,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct CommunityJoin {
pub community_id: CommunityId,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct CommunityJoinResponse {
pub joined: bool,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct ModJoin {
pub community_id: CommunityId,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct ModJoinResponse {
pub joined: bool,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct PostJoin {
pub post_id: PostId,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct PostJoinResponse {
pub joined: bool,
}