- NodeInfo at /.well-known/nodeinfo + /nodeinfo/2.0
- Hashtags #MoviesDiary + #MovieTitle on review posts; /tags/{tag} redirect
- Domain blocking: blocked_domains table, admin API + HTML, inbox enforcement
- Per-actor blocking: blocked_actors table, user API + HTML, BlockActivity send/receive
- Delivery filter excludes blocked actors and blocked-domain inboxes
19 lines
525 B
Rust
19 lines
525 B
Rust
use async_trait::async_trait;
|
|
use url::Url;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub struct ApUser {
|
|
pub id: uuid::Uuid,
|
|
pub username: String,
|
|
pub bio: Option<String>,
|
|
pub avatar_url: Option<Url>,
|
|
pub profile_url: Option<Url>,
|
|
}
|
|
|
|
#[async_trait]
|
|
pub trait ApUserRepository: Send + Sync {
|
|
async fn find_by_id(&self, id: uuid::Uuid) -> anyhow::Result<Option<ApUser>>;
|
|
async fn find_by_username(&self, username: &str) -> anyhow::Result<Option<ApUser>>;
|
|
async fn count_users(&self) -> anyhow::Result<usize>;
|
|
}
|