From 7be20abcadcb4e70ed398b93118bd7f11b343ce1 Mon Sep 17 00:00:00 2001 From: Jade Ellis Date: Wed, 31 Dec 2025 19:26:34 +0000 Subject: [PATCH] style: Fix typo --- src/service/pusher/mod.rs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/service/pusher/mod.rs b/src/service/pusher/mod.rs index dd75027b..5b315bd5 100644 --- a/src/service/pusher/mod.rs +++ b/src/service/pusher/mod.rs @@ -427,20 +427,20 @@ impl Service { } let d = vec![device]; - let mut notifi = Notification::new(d); + let mut notify = Notification::new(d); - notifi.event_id = Some(event.event_id().to_owned()); - notifi.room_id = Some(event.room_id().unwrap().to_owned()); + notify.event_id = Some(event.event_id().to_owned()); + notify.room_id = Some(event.room_id().unwrap().to_owned()); if http .data .get("org.matrix.msc4076.disable_badge_count") .is_none() && http.data.get("disable_badge_count").is_none() { - notifi.counts = NotificationCounts::new(unread, uint!(0)); + notify.counts = NotificationCounts::new(unread, uint!(0)); } else { // counts will not be serialised if it's the default (0, 0) // skip_serializing_if = "NotificationCounts::is_default" - notifi.counts = NotificationCounts::default(); + notify.counts = NotificationCounts::default(); } if !event_id_only { @@ -449,30 +449,30 @@ impl Service { .iter() .any(|t| matches!(t, Tweak::Highlight(true) | Tweak::Sound(_))) { - notifi.prio = NotificationPriority::High; + notify.prio = NotificationPriority::High; } else { - notifi.prio = NotificationPriority::Low; + notify.prio = NotificationPriority::Low; } - notifi.sender = Some(event.sender().to_owned()); - notifi.event_type = Some(event.kind().to_owned()); - notifi.content = serde_json::value::to_raw_value(event.content()).ok(); + notify.sender = Some(event.sender().to_owned()); + notify.event_type = Some(event.kind().to_owned()); + notify.content = serde_json::value::to_raw_value(event.content()).ok(); if *event.kind() == TimelineEventType::RoomMember { - notifi.user_is_target = + notify.user_is_target = event.state_key() == Some(event.sender().as_str()); } - notifi.sender_display_name = + notify.sender_display_name = self.services.users.displayname(event.sender()).await.ok(); - notifi.room_name = self + notify.room_name = self .services .state_accessor .get_name(event.room_id().unwrap()) .await .ok(); - notifi.room_alias = self + notify.room_alias = self .services .state_accessor .get_canonical_alias(event.room_id().unwrap()) @@ -480,7 +480,7 @@ impl Service { .ok(); } - self.send_request(&http.url, send_event_notification::v1::Request::new(notifi)) + self.send_request(&http.url, send_event_notification::v1::Request::new(notify)) .await?; Ok(())