use single global function for server name local and user local checking
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
8f17d965b2
commit
9931e60050
14 changed files with 77 additions and 41 deletions
|
@ -23,7 +23,12 @@ use ruma::{
|
|||
use tracing::{debug, error, warn};
|
||||
|
||||
use super::{appservice, send, Destination, Msg, SendingEvent, Service};
|
||||
use crate::{service::presence::Presence, services, utils::calculate_hash, Error, PduEvent, Result};
|
||||
use crate::{
|
||||
service::presence::Presence,
|
||||
services,
|
||||
utils::{calculate_hash, user_id::user_is_local},
|
||||
Error, PduEvent, Result,
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
enum TransactionStatus {
|
||||
|
@ -244,7 +249,7 @@ impl Service {
|
|||
.users
|
||||
.keys_changed(room_id.as_ref(), since, None)
|
||||
.filter_map(Result::ok)
|
||||
.filter(|user_id| user_id.server_name() == services().globals.server_name()),
|
||||
.filter(|user_id| user_is_local(user_id)),
|
||||
);
|
||||
|
||||
if services().globals.allow_outgoing_read_receipts()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue