feat: add optional mood to thoughts with custom moods support
Some checks failed
lint / lint (push) Failing after 9m28s
test / unit (push) Successful in 16m8s

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:
2026-05-29 15:38:35 +02:00
parent be27fe04e2
commit 442a61bbdb
34 changed files with 294 additions and 42 deletions

View File

@@ -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)]

View File

@@ -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)]