fix: don't apply push rules for users of other homeservers

This commit is contained in:
Timo Kösters 2021-05-30 22:01:12 +02:00
parent 88cf043f94
commit e1e529d818
No known key found for this signature in database
GPG Key ID: 24DA7517711A2BA4
1 changed files with 2 additions and 1 deletions

View File

@ -725,8 +725,9 @@ impl Rooms {
.users
.iter()
.filter_map(|r| r.ok())
.filter(|user_id| self.is_joined(&user_id, &pdu.room_id).unwrap_or(false))
.filter(|user_id| user_id.server_name() == db.globals.server_name())
.filter(|user_id| !db.users.is_deactivated(user_id).unwrap_or(false))
.filter(|user_id| self.is_joined(&user_id, &pdu.room_id).unwrap_or(false))
{
// Don't notify the user of their own events
if user == pdu.sender {