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:
@@ -95,6 +95,16 @@ fn build_note_json(
|
||||
.collect();
|
||||
note["tag"] = serde_json::json!(ap_tags);
|
||||
}
|
||||
if let Some(ref mood) = thought.mood {
|
||||
note["mood"] = serde_json::json!(mood);
|
||||
}
|
||||
if let Some(ref ext) = thought.note_extensions {
|
||||
if let Some(obj) = ext.as_object() {
|
||||
for (k, v) in obj {
|
||||
note.as_object_mut().unwrap().entry(k).or_insert(v.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
note
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user