fix(sdk): Don't send notifications for your own user
@@ -373,6 +373,11 @@ impl BaseClient {
}
if let Some(context) = &push_context {
+ if event
+ .event
+ .get_field::<OwnedUserId>("sender")?
+ .map_or(false, |id| id == user_id)
+ {
let actions = push_rules.get_actions(&event.event, context).to_vec();
if actions.iter().any(|a| matches!(a, Action::Notify)) {
@@ -387,6 +392,7 @@ impl BaseClient {
),
);
}
+ }
// TODO if there is an
// Action::SetTweak(Tweak::Highlight) we need to store
// its value with the event so a client can show if the
