Commit Graph

113 Commits

Author SHA1 Message Date
Alex Gleason
9e9ab40886 Run the custom policy in a worker for security 2024-05-15 20:19:49 -05:00
Alex Gleason
6a1b8b0943 policy: improve error handling 2024-05-15 19:30:20 -05:00
Alex Gleason
8a672c93ec Debug custom policies with ditto:policy 2024-05-15 18:59:51 -05:00
Alex Gleason
8e68d13ff1 Let custom policy be configured with DITTO_POLICY 2024-05-15 18:49:55 -05:00
Alex Gleason
221c41fdfa EventsDB: make it a simple wrapper around NDatabase 2024-05-14 21:23:25 -05:00
Alex Gleason
a4226a963f Rework Kysely db to be async 2024-05-14 18:44:42 -05:00
Alex Gleason
68b5887ed0 Don't let your memes be dreams 2024-05-14 18:24:34 -05:00
Alex Gleason
eef349f1e9 Update stats before storing event 2024-05-14 15:05:59 -05:00
Alex Gleason
46b5bbf841 Uppercase CustomPolicy 2024-05-14 14:39:48 -05:00
Alex Gleason
ecfea827e1 Move RelayError into its own file, add helper methods 2024-05-14 14:38:38 -05:00
P. Reis
4029971407 fix(pipeline): load custom policy if available 2024-05-13 17:44:33 -03:00
Alex Gleason
6105e00c80 pipeline: add a placeholder for custom policy 2024-05-13 12:43:01 -05:00
Alex Gleason
9bff7a5086 Fix some issues in pipeline and utils/api.ts 2024-05-13 12:30:56 -05:00
P. Reis
fe66937bba feat: do not allow deactivated accounts to post 2024-05-11 12:04:44 -03:00
Alex Gleason
2b2499849f pipeline: fix reqmeister crash, probably 2024-05-03 13:52:11 -05:00
Alex Gleason
e9c5ef89ff Reqmeister: improve API and fetching logic (untested) 2024-05-03 13:33:50 -05:00
Alex Gleason
705e8e7c31 PoolStore: implement NRelay 2024-05-03 13:23:00 -05:00
Alex Gleason
4045a6bdfc Catch metadata when parsing 2024-05-01 19:55:58 -05:00
Alex Gleason
87264eeef1 Remove relays table from the database, track them with a NIP-65 admin event 2024-05-01 19:15:20 -05:00
Alex Gleason
3513206de1 stickynotes alias 2024-05-01 16:14:50 -05:00
Alex Gleason
c190d2c8ce Refactor Storages to get lazy-loaded only when they are used 2024-05-01 14:56:47 -05:00
Alex Gleason
23e00b0042 Make Kysely an import alias 2024-05-01 09:26:17 -05:00
Alex Gleason
f61d29eb66 Upgrade Nostrify to v0.15, use MockRelay in tests instead of NCache 2024-04-26 12:33:52 -05:00
Alex Gleason
7a18a19b2f Remove subs.ts & subscription.ts, refactor around it 2024-04-25 18:23:26 -05:00
Alex Gleason
5d84566385 Merge branch 'perf-hydrate-events' into 'main'
Performance: hydrate events makes up to 5 calls to database

See merge request soapbox-pub/ditto!175
2024-04-23 20:24:55 +00:00
Alex Gleason
a53a21ffcf pipeline: print policy result 2024-04-23 01:29:18 -05:00
Alex Gleason
69178ae523 Load a custom policy from data/policy.ts 2024-04-23 01:11:37 -05:00
P. Reis
b77c8a00cd perf: make up to 5 calls to database in hydrateEvents & remove old hydrate functions 2024-04-22 22:15:36 -03:00
Alex Gleason
9c91e41e87 Switch NSpec to Nostrify, update imports 2024-04-19 16:39:35 -05:00
Alex Gleason
595d5a4117 Avoid EventDB.count for single row fetches 2024-04-08 10:43:26 -05:00
Alex Gleason
c0c586b364 Add last_updated_at column to pubkey_domains 2024-04-05 21:48:59 -05:00
Alex Gleason
5e834d2a6b pipeline: remove broadcast function 2024-04-02 19:53:11 -05:00
Alex Gleason
21bec6b131 pipeline: call hydrateEvents from hydrateEvent 2024-03-30 23:38:48 -05:00
Alex Gleason
940fc7a305 Add DVM module, process domain name requests 2024-03-26 19:28:13 -05:00
Alex Gleason
25a4384587 Hydrate event author in pipeline to relieve streaming API 2024-03-20 13:49:02 -05:00
Alex Gleason
07ebb490d2 Make streaming by domain work 2024-03-20 13:42:59 -05:00
Alex Gleason
a8b5888e6d pipeline: get nip05 domain correctly 2024-03-20 13:20:12 -05:00
Alex Gleason
e2cc6132be Track pubkey domains 2024-03-19 17:45:19 -05:00
Alex Gleason
648c32986b pipeline: remove awkward registerUser flow 2024-03-16 15:07:45 -05:00
Alex Gleason
09369a0122 hydrateEvent -> purifyEvent (it sounds cooler) 2024-03-16 13:19:11 -05:00
Alex Gleason
0df4ac7331 pipeline: let the people post 2024-03-16 13:16:35 -05:00
Alex Gleason
3c8b5be783 pipeline: fix hydrateEvent 2024-03-12 17:09:22 -05:00
Alex Gleason
45e1762b50 pipeline: handle registrations 2024-03-12 16:10:19 -05:00
Alex Gleason
641d2872d8 Actually, revert anything Alby would sign to nip04 since Alby doesn't support nip44 yet 2024-02-21 14:50:26 -06:00
Alex Gleason
d5d642b10b Switch all nip04 calls to nip44 2024-02-21 14:39:05 -06:00
Alex Gleason
5961b28c36 Remove crypo.ts, call AdminSigner instead 2024-02-12 12:01:35 -06:00
Alex Gleason
59d53c4a2f Add APISigner and AdminSigner classes, implement NostrSigner interface 2024-02-12 11:52:05 -06:00
Alex Gleason
1e3f637358 verifySignatureWorker -> verifyEventWorker 2024-02-12 11:42:25 -06:00
Alex Gleason
cb80770fc7 Upgrade NSpec, update count interface 2024-02-12 10:48:26 -06:00
Alex Gleason
e9d29075eb pipeline: catch error on broadcast 2024-02-02 14:51:22 -06:00