2026-07-28 16:16:26 +00:00
|
|
|
import {derived} from "svelte/store"
|
2026-08-17 16:21:30 +00:00
|
|
|
import {REPORT, sortEventsDesc} from "@welshman/util"
|
|
|
|
|
import {rooms} from "@app/core"
|
2026-06-08 22:33:38 +00:00
|
|
|
import {deriveEventsForUrl} from "@app/repository"
|
2026-07-28 16:16:26 +00:00
|
|
|
|
2026-06-08 22:33:38 +00:00
|
|
|
// Action items (admin review queue)
|
|
|
|
|
|
|
|
|
|
export const deriveSpaceActionItems = (url: string) =>
|
|
|
|
|
derived(
|
2026-08-17 16:21:30 +00:00
|
|
|
[deriveEventsForUrl(url, [{kinds: [REPORT]}]), rooms.get().pendingJoins(url).$],
|
|
|
|
|
([$reports, $pendingJoins]) => sortEventsDesc([...$reports, ...$pendingJoins]),
|
2026-06-08 22:33:38 +00:00
|
|
|
)
|