Skip to content

Commit 4c448aa

Browse files
hitalinclaude
andcommitted
feat: 通知にachievementフィールドを追加
achievementEarned通知で獲得した実績名をフロントエンドに渡すため、 RawNotificationとNormalizedNotificationにachievementフィールドを追加。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3799a3f commit 4c448aa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/models.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,8 @@ pub struct NormalizedNotification {
311311
pub reaction: Option<String>,
312312
#[serde(skip_serializing_if = "Option::is_none")]
313313
pub message: Option<String>,
314+
#[serde(skip_serializing_if = "Option::is_none")]
315+
pub achievement: Option<String>,
314316
}
315317

316318
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -671,6 +673,7 @@ pub struct RawNotification {
671673
pub note: Option<RawNote>,
672674
pub reaction: Option<String>,
673675
pub message: Option<String>,
676+
pub achievement: Option<String>,
674677
}
675678

676679
#[derive(Debug, Deserialize)]
@@ -968,6 +971,7 @@ impl RawNotification {
968971
note: self.note.map(|n| n.normalize(account_id, server_host)),
969972
reaction: self.reaction,
970973
message: self.message,
974+
achievement: self.achievement,
971975
}
972976
}
973977
}

0 commit comments

Comments
 (0)