fix(push): drop Fluxer badge on self-hosted instances (#3400)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-11 15:56:53 +02:00
1 parent be314788b3
commit af7724dbf6
5 files changed
+104 -20

No files matched your search

+11 -1
View File
@@ -36,7 +36,8 @@ pub struct NotificationFields {
pub title: String,
pub body: String,
pub icon: String,
pub badge: String,
#[serde(default)]
pub badge: Option<String>,
pub tag: String,
pub notification_tag: String,
pub url: String,
@@ -165,6 +166,15 @@ mod tests {
assert_eq!(job.channel_name, None);
}
#[test]
fn a_job_without_a_badge_decodes() {
let job = decode_message(
br#"{"v":1,"guild_id":"5","channel_id":"6","message_id":"7","notification":{"title":"t","body":"b","icon":"i","tag":"x","notification_tag":"y","url":"/u"},"user_ids":["8"]}"#,
)
.expect("the job decodes");
assert_eq!(job.notification.badge, None);
}
#[test]
fn a_thread_job_decodes_its_optional_fields() {
let job = decode_message(