fix: profile shows only own reviews, federation display name in community
- diary API accepts user_id filter, profile page passes it - movie social feed joins ap_remote_actors for handle resolution - COALESCE prefers actor handle for remote reviews, email for local
This commit is contained in:
@@ -141,10 +141,10 @@ function StatCell({ label, value }: { label: string; value: string | number }) {
|
||||
)
|
||||
}
|
||||
|
||||
function DiaryTab({ sortBy, search }: { sortBy: string; userId?: string; search?: string }) {
|
||||
function DiaryTab({ sortBy, userId, search }: { sortBy: string; userId?: string; search?: string }) {
|
||||
const { t } = useTranslation()
|
||||
const { data, isPending, hasNextPage, isFetchingNextPage, fetchNextPage } =
|
||||
useInfiniteDiary({ sort_by: sortBy, movie_id: undefined })
|
||||
useInfiniteDiary({ sort_by: sortBy, user_id: userId })
|
||||
const items = data?.pages.flatMap((p) => p.items) ?? []
|
||||
const filtered = search
|
||||
? items.filter((e) =>
|
||||
|
||||
@@ -8,6 +8,7 @@ export const diaryQueryParamsSchema = z.object({
|
||||
offset: z.number().optional(),
|
||||
sort_by: z.string().optional(),
|
||||
movie_id: z.string().uuid().optional(),
|
||||
user_id: z.string().uuid().optional(),
|
||||
})
|
||||
export type DiaryQueryParams = z.infer<typeof diaryQueryParamsSchema>
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ function ProfilePage() {
|
||||
|
||||
<ProfileView
|
||||
data={data}
|
||||
userId={auth.user_id}
|
||||
search={search}
|
||||
onSearchChange={setSearch}
|
||||
actions={
|
||||
|
||||
Reference in New Issue
Block a user