Feat add actors to meilisearch (#1048)

* initial commit

* update api docs

* adds search token versioning

* make id filterable

* isLocal -> is_local

* add iri to actor index

* update gitignore

* Merge remote-tracking branch 'origin/main' into feat-add-actors-to-meilisearch

* fix sharing for newly discovered actors

* fix ActorSearchResult type

---------

Co-authored-by: Christian Beutel <>
This commit is contained in:
Flomp
2026-06-09 21:02:05 +02:00
committed by GitHub
parent 1e2b4ea75d
commit c04a719ca6
45 changed files with 392 additions and 108 deletions

View File

@@ -19,7 +19,7 @@
import Toggle from "./toggle.svelte";
import type { SearchItem } from "./search.svelte";
import type { SuggestionProps } from "@tiptap/suggestion";
import type { Actor } from "$lib/models/activitypub/actor";
import type { Actor, ActorSearchResult } from "$lib/models/activitypub/actor";
import { searchActors } from "$lib/stores/search_store";
import { show_toast } from "$lib/stores/toast_store.svelte";
@@ -103,13 +103,13 @@
allowToIncludeChar: true,
items: async ({ query }) => {
try {
const actors: Actor[] = await searchActors(
const actors: ActorSearchResult[] = await searchActors(
query,
true,
);
return actors.map((a) => ({
text: a.username!,
description: `@${a.preferred_username}${a.isLocal ? "" : "@" + a.domain}`,
description: `@${a.preferred_username}${a.is_local ? "" : "@" + a.domain}`,
value: a,
icon:
a.icon ||
@@ -155,7 +155,7 @@
return (_: Event, item: SearchItem) => {
props.command({
id: item.value.iri,
label: `${item.value.preferred_username}${item.value.isLocal ? "" : "@" + item.value.domain}`,
label: `${item.value.preferred_username}${item.value.is_local ? "" : "@" + item.value.domain}`,
});
};
}