diff --git a/server/src/matrix/notifications.rs b/server/src/matrix/notifications.rs
index 3ed17dc..ecfe3b8 100644
--- a/server/src/matrix/notifications.rs
+++ b/server/src/matrix/notifications.rs
@@ -73,9 +73,10 @@ pub fn format_stage_notification(
let number = extract_story_number(item_id).unwrap_or(item_id);
let name = story_name.unwrap_or(item_id);
- let plain = format!("#{number} {name} \u{2014} {from_stage} \u{2192} {to_stage}");
+ let prefix = if to_stage == "Done" { "\u{1f389} " } else { "" };
+ let plain = format!("{prefix}#{number} {name} \u{2014} {from_stage} \u{2192} {to_stage}");
let html = format!(
- "#{number} {name} \u{2014} {from_stage} \u{2192} {to_stage}"
+ "{prefix}#{number} {name} \u{2014} {from_stage} \u{2192} {to_stage}"
);
(plain, html)
}
@@ -320,6 +321,35 @@ mod tests {
// ── format_stage_notification ───────────────────────────────────────────
+ #[test]
+ fn format_notification_done_stage_includes_party_emoji() {
+ let (plain, html) = format_stage_notification(
+ "353_story_done",
+ Some("Done Story"),
+ "Merge",
+ "Done",
+ );
+ assert_eq!(
+ plain,
+ "\u{1f389} #353 Done Story \u{2014} Merge \u{2192} Done"
+ );
+ assert_eq!(
+ html,
+ "\u{1f389} #353 Done Story \u{2014} Merge \u{2192} Done"
+ );
+ }
+
+ #[test]
+ fn format_notification_non_done_stage_has_no_emoji() {
+ let (plain, _html) = format_stage_notification(
+ "42_story_thing",
+ Some("Some Story"),
+ "Backlog",
+ "Current",
+ );
+ assert!(!plain.contains("\u{1f389}"));
+ }
+
#[test]
fn format_notification_with_story_name() {
let (plain, html) = format_stage_notification(