feat: add optional mood to thoughts with custom moods support
Mood is an optional label+emoji string (e.g. "relaxed 😌") on thoughts.
Users can define up to 8 custom moods in profile settings.
Mood federates via AP Note JSON and displays on thought cards.
This commit is contained in:
@@ -31,6 +31,7 @@ pub struct CreateThoughtRequest {
|
||||
pub visibility: Option<String>,
|
||||
pub content_warning: Option<String>,
|
||||
pub sensitive: Option<bool>,
|
||||
pub mood: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, utoipa::ToSchema)]
|
||||
@@ -48,6 +49,7 @@ pub struct UpdateProfileRequest {
|
||||
pub header_url: Option<String>,
|
||||
pub custom_css: Option<String>,
|
||||
pub profile_fields: Option<Vec<crate::responses::ProfileField>>,
|
||||
pub custom_moods: Option<Vec<crate::responses::ProfileField>>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, utoipa::ToSchema)]
|
||||
|
||||
@@ -20,6 +20,7 @@ pub struct UserResponse {
|
||||
pub header_url: Option<String>,
|
||||
pub custom_css: Option<String>,
|
||||
pub profile_fields: Vec<ProfileField>,
|
||||
pub custom_moods: Vec<ProfileField>,
|
||||
pub local: bool,
|
||||
pub is_followed_by_viewer: bool,
|
||||
#[serde(rename = "joinedAt")]
|
||||
@@ -48,6 +49,8 @@ pub struct ThoughtResponse {
|
||||
pub updated_at: Option<DateTime<Utc>>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub note_extensions: Option<serde_json::Value>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub mood: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, utoipa::ToSchema)]
|
||||
|
||||
Reference in New Issue
Block a user