From 6d5dbc029e742ff8b06889581e0d2b04ddfefa19 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 2 Jun 2024 22:59:06 -0500 Subject: [PATCH] Remove self from suggested list --- src/controllers/api/suggestions.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/controllers/api/suggestions.ts b/src/controllers/api/suggestions.ts index 3015157..b56851a 100644 --- a/src/controllers/api/suggestions.ts +++ b/src/controllers/api/suggestions.ts @@ -61,6 +61,10 @@ async function renderV2Suggestions(c: AppContext, params: PaginatedListParams, s const ignored = follows.union(mutes); const pubkeys = suggested.union(trending).difference(ignored); + if (pubkey) { + pubkeys.delete(pubkey); + } + const authors = [...pubkeys].slice(offset, offset + limit); const profiles = await store.query(