mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-21 23:44:20 +01:00
Add verifySignatureWorker
This commit is contained in:
@@ -12,6 +12,7 @@ import { Sub } from '@/subs.ts';
|
||||
import { getTagSet } from '@/tags.ts';
|
||||
import { trends } from '@/trends.ts';
|
||||
import { eventAge, isRelay, nostrDate, Time } from '@/utils.ts';
|
||||
import { verifySignatureWorker } from '@/workers/verify.ts';
|
||||
|
||||
import type { EventData } from '@/types.ts';
|
||||
|
||||
@@ -20,6 +21,7 @@ import type { EventData } from '@/types.ts';
|
||||
* It is idempotent, so it can be called multiple times for the same event.
|
||||
*/
|
||||
async function handleEvent(event: Event): Promise<void> {
|
||||
if (!(await verifySignatureWorker(event))) return;
|
||||
if (encounterEvent(event)) return;
|
||||
const data = await getEventData(event);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user