suggest -> suggested

This commit is contained in:
Alex Gleason 2024-06-09 11:24:01 -05:00
parent 58a01f90de
commit 8802cbd779
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
3 changed files with 5 additions and 5 deletions

View File

@ -157,7 +157,7 @@ const pleromaAdminSuggestController: AppController = async (c) => {
for (const nickname of nicknames) { for (const nickname of nicknames) {
const pubkey = await lookupPubkey(nickname); const pubkey = await lookupPubkey(nickname);
if (!pubkey) continue; if (!pubkey) continue;
await updateUser(pubkey, { suggest: true }, c); await updateUser(pubkey, { suggested: true }, c);
} }
return new Response(null, { status: 204 }); return new Response(null, { status: 204 });
@ -169,7 +169,7 @@ const pleromaAdminUnsuggestController: AppController = async (c) => {
for (const nickname of nicknames) { for (const nickname of nicknames) {
const pubkey = await lookupPubkey(nickname); const pubkey = await lookupPubkey(nickname);
if (!pubkey) continue; if (!pubkey) continue;
await updateUser(pubkey, { suggest: false }, c); await updateUser(pubkey, { suggested: false }, c);
} }
return new Response(null, { status: 204 }); return new Response(null, { status: 204 });

View File

@ -31,7 +31,7 @@ async function renderV2Suggestions(c: AppContext, params: PaginatedListParams, s
const pubkey = await signer?.getPublicKey(); const pubkey = await signer?.getPublicKey();
const filters: NostrFilter[] = [ const filters: NostrFilter[] = [
{ kinds: [30382], authors: [Conf.pubkey], '#n': ['suggest'], limit }, { kinds: [30382], authors: [Conf.pubkey], '#n': ['suggested'], limit },
{ kinds: [1985], '#L': ['pub.ditto.trends'], '#l': [`#p`], authors: [Conf.pubkey], limit: 1 }, { kinds: [1985], '#L': ['pub.ditto.trends'], '#l': [`#p`], authors: [Conf.pubkey], limit: 1 },
]; ];
@ -43,7 +43,7 @@ async function renderV2Suggestions(c: AppContext, params: PaginatedListParams, s
const events = await store.query(filters, { signal }); const events = await store.query(filters, { signal });
const [userEvents, followsEvent, mutesEvent, trendingEvent] = [ const [userEvents, followsEvent, mutesEvent, trendingEvent] = [
events.filter((event) => matchFilter({ kinds: [30382], authors: [Conf.pubkey], '#n': ['suggest'] }, event)), events.filter((event) => matchFilter({ kinds: [30382], authors: [Conf.pubkey], '#n': ['suggested'] }, event)),
pubkey ? events.find((event) => matchFilter({ kinds: [3], authors: [pubkey] }, event)) : undefined, pubkey ? events.find((event) => matchFilter({ kinds: [3], authors: [pubkey] }, event)) : undefined,
pubkey ? events.find((event) => matchFilter({ kinds: [10000], authors: [pubkey] }, event)) : undefined, pubkey ? events.find((event) => matchFilter({ kinds: [10000], authors: [pubkey] }, event)) : undefined,
events.find((event) => events.find((event) =>

View File

@ -79,7 +79,7 @@ async function renderAccount(
pleroma: { pleroma: {
is_admin: names.has('admin'), is_admin: names.has('admin'),
is_moderator: names.has('admin') || names.has('moderator'), is_moderator: names.has('admin') || names.has('moderator'),
is_suggested: names.has('suggest'), is_suggested: names.has('suggested'),
is_local: parsed05?.domain === Conf.url.host, is_local: parsed05?.domain === Conf.url.host,
settings_store: undefined as unknown, settings_store: undefined as unknown,
tags: [...getTagSet(event.user?.tags ?? [], 't')], tags: [...getTagSet(event.user?.tags ?? [], 't')],