feat: implement unread notification count and enhance user listing with pagination
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m33s
test / unit (pull_request) Successful in 16m24s
test / integration (pull_request) Failing after 16m52s

This commit is contained in:
2026-05-15 12:04:00 +02:00
parent 5f61a71336
commit 6273635aeb
15 changed files with 253 additions and 154 deletions

View File

@@ -1,8 +1,8 @@
use crate::{errors::ApiError, extractors::AuthUser, state::AppState};
use api_types::responses::RemoteActorResponse;
use api_types::responses::{ProfileField, RemoteActorResponse};
use application::use_cases::federation_management::{
accept_follow_request, list_pending_requests, list_remote_followers, list_remote_following,
reject_follow_request,
reject_follow_request, remove_remote_following,
};
use axum::{extract::State, http::StatusCode, Json};
use serde::Deserialize;
@@ -29,7 +29,11 @@ fn to_response(a: domain::models::remote_actor::RemoteActor) -> RemoteActorRespo
outbox_url: a.outbox_url,
followers_url: a.followers_url,
following_url: a.following_url,
attachment: vec![],
attachment: a
.attachment
.into_iter()
.map(|(name, value)| ProfileField { name, value })
.collect(),
}
}
@@ -80,7 +84,7 @@ pub async fn delete_following(
AuthUser(uid): AuthUser,
Json(body): Json<HandleBody>,
) -> Result<StatusCode, ApiError> {
application::use_cases::social::unfollow_actor(
remove_remote_following(
&*s.follows,
&*s.users,
&*s.federation,