mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
Add group icons / profile backgrounds.
This commit is contained in:
@@ -28,6 +28,7 @@ pub enum Channel {
|
||||
DirectMessage {
|
||||
#[serde(rename = "_id")]
|
||||
id: String,
|
||||
|
||||
active: bool,
|
||||
recipients: Vec<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
@@ -38,10 +39,14 @@ pub enum Channel {
|
||||
id: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
nonce: Option<String>,
|
||||
|
||||
name: String,
|
||||
owner: String,
|
||||
description: String,
|
||||
recipients: Vec<String>,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
icon: Option<File>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
last_message: Option<LastMessage>,
|
||||
},
|
||||
|
||||
@@ -45,18 +45,20 @@ pub enum Presence {
|
||||
pub struct UserStatus {
|
||||
#[validate(length(min = 1, max = 128))]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
text: Option<String>,
|
||||
pub text: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
presence: Option<Presence>,
|
||||
pub presence: Option<Presence>,
|
||||
}
|
||||
|
||||
#[derive(Validate, Serialize, Deserialize, Debug)]
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct UserProfile {
|
||||
#[validate(length(min = 1, max = 2000))]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
content: Option<String>,
|
||||
pub content: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub background: Option<File>,
|
||||
}
|
||||
|
||||
// When changing this struct, update notifications/payload.rs#80
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct User {
|
||||
#[serde(rename = "_id")]
|
||||
|
||||
Reference in New Issue
Block a user