mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
fix(handleZaps): reject all kinds but 9735
This commit is contained in:
parent
e1ee3bd8e9
commit
fdb720386d
1 changed files with 2 additions and 0 deletions
|
|
@ -228,6 +228,8 @@ async function generateSetEvents(event: NostrEvent): Promise<void> {
|
|||
|
||||
/** Stores the event in the 'event_zaps' table */
|
||||
async function handleZaps(kysely: Kysely<DittoTables>, event: NostrEvent) {
|
||||
if (event.kind !== 9735) return;
|
||||
|
||||
const zapRequestString = event?.tags?.find(([name]) => name === 'description')?.[1];
|
||||
if (!zapRequestString) return;
|
||||
const zapRequest = n.json().pipe(n.event()).optional().catch(undefined).parse(zapRequestString);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue