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:
@@ -22,6 +22,7 @@ pub struct Thought {
|
||||
pub created_at: DateTime<Utc>,
|
||||
pub updated_at: Option<DateTime<Utc>>,
|
||||
pub note_extensions: Option<serde_json::Value>,
|
||||
pub mood: Option<String>,
|
||||
}
|
||||
|
||||
impl Visibility {
|
||||
@@ -55,6 +56,7 @@ pub struct NewThought {
|
||||
pub visibility: Visibility,
|
||||
pub content_warning: Option<String>,
|
||||
pub sensitive: bool,
|
||||
pub mood: Option<String>,
|
||||
}
|
||||
|
||||
impl Thought {
|
||||
@@ -71,6 +73,7 @@ impl Thought {
|
||||
created_at: Utc::now(),
|
||||
updated_at: None,
|
||||
note_extensions: None,
|
||||
mood: p.mood,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user