Merge branch 'main' into mint-cashu

This commit is contained in:
P. Reis 2025-03-25 18:23:13 -03:00
commit 71a558a9de
2 changed files with 4 additions and 4 deletions

View file

@ -85,7 +85,7 @@ export class DittoPgStore extends NPostgres {
'a': ({ count }) => count < 15, 'a': ({ count }) => count < 15,
'd': ({ event, count }) => count === 0 && NKinds.parameterizedReplaceable(event.kind), 'd': ({ event, count }) => count === 0 && NKinds.parameterizedReplaceable(event.kind),
'e': DittoPgStore.eTagCondition, 'e': DittoPgStore.eTagCondition,
'k': ({ count, value }) => count === 0 && Number.isInteger(Number(value)), 'k': ({ count }) => count < 3,
'L': ({ event, count }) => event.kind === 1985 || count === 0, 'L': ({ event, count }) => event.kind === 1985 || count === 0,
'l': ({ event, count }) => event.kind === 1985 || count === 0, 'l': ({ event, count }) => event.kind === 1985 || count === 0,
'n': ({ count, value }) => count < 50 && value.length < 50, 'n': ({ count, value }) => count < 50 && value.length < 50,

View file

@ -98,14 +98,14 @@ async function renderReaction(store: NStore, event: DittoEvent, opts: RenderNoti
}; };
} }
async function renderNameGrant(event: DittoEvent) { function renderNameGrant(event: DittoEvent) {
const r = event.tags.find(([name]) => name === 'r')?.[1]; const r = event.tags.find(([name]) => name === 'r')?.[1];
const d = event.tags.find(([name]) => name === 'd')?.[1]; const d = event.tags.find(([name]) => name === 'd')?.[1];
const name = r ?? d; const name = r ?? d;
if (name) return; if (!name) return;
const account = event.author ? await renderAccount(event.author) : await accountFromPubkey(event.pubkey); const account = event.author ? renderAccount(event.author) : accountFromPubkey(event.pubkey);
return { return {
id: notificationId(event), id: notificationId(event),