mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
use single global function for server name local and user local checking
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
//! utilities for doing things with UserId's / usernames
|
||||
|
||||
use ruma::UserId;
|
||||
|
||||
use crate::services;
|
||||
|
||||
/// checks if `user_id` is local to us via server_name comparison
|
||||
pub(crate) fn user_is_local(user_id: &UserId) -> bool { user_id.server_name() == services().globals.config.server_name }
|
||||
Reference in New Issue
Block a user