Commit Graph

1051 Commits

Author SHA1 Message Date
Alex Gleason
7feecab723 stats: fix ambiguous column name error in Postgres? 2024-05-14 15:25:56 -05:00
Alex Gleason
eef349f1e9 Update stats before storing event 2024-05-14 15:05:59 -05:00
Alex Gleason
efa1c92044 Merge remote-tracking branch 'origin/main' into signer-middleware 2024-05-14 14:48:47 -05:00
Alex Gleason
e53ea22274 Remove unused import 2024-05-14 14:48:37 -05:00
Alex Gleason
f12bb4b643 Merge branch 'block-globally-muted-user-to-post' into 'main'
Do not allow deactivated accounts to post

Closes #118

See merge request soapbox-pub/ditto!245
2024-05-14 19:46:36 +00: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
Alex Gleason
45b766af4d Remove 'user' from AppContext 2024-05-14 14:24:48 -05:00
Alex Gleason
a061c248bd signerMiddleware: add debug log 2024-05-14 14:18:44 -05:00
Alex Gleason
e5392f4d9e Merge remote-tracking branch 'origin/main' into signer-middleware 2024-05-14 14:16:38 -05:00
Alex Gleason
2f938ae42e Merge branch 'hydrate-test-kind-1984' into 'main'
Hydrate test: code coverage in kind 1984 & refactor to import fixtures in a dynamic way

Closes #125

See merge request soapbox-pub/ditto!249
2024-05-14 17:49:19 +00:00
Alex Gleason
cd2a35d951 ConnectSigner: make getPublicKey used the stored value instead of actually hitting the relay 2024-05-14 12:20:36 -05:00
Alex Gleason
03182f8a5a ConnectSigner: implement getRelays, support nprofile auth again 2024-05-14 12:14:27 -05:00
Alex Gleason
084143c5c8 Rename all middleware to thingMiddleware 2024-05-14 12:07:54 -05:00
Alex Gleason
1accae2222 Add a ConnectSigner to wrap our default opts to NConnectSigner, add c.set('signer') calls to nip98 middleware 2024-05-14 12:04:31 -05:00
Alex Gleason
c715827c81 c.get('pubkey') -> await c.get('signer')?.getPublicKey() 2024-05-14 11:57:03 -05:00
Alex Gleason
c5fbe69b80 requirePubkey -> requireSigner 2024-05-14 11:42:53 -05:00
Alex Gleason
5a2b1b7de7 Destroy everything 2024-05-14 11:40:20 -05:00
Alex Gleason
ee7864da8c Add a signerMiddleware 2024-05-14 11:31:20 -05:00
P. Reis
caaa7016f0 test(hydrate): refactor to import fixtures with 'eventFixture' function 2024-05-13 21:56:29 -03:00
Alex Gleason
cc9d2efef9 Fix mentions 2024-05-13 18:50:20 -05:00
P. Reis
78137f373f test(hydrate): kind 1984 2024-05-13 20:22:27 -03: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
Alex Gleason
2140b3fbb2 lookupPubkey: check the bech32 first 2024-05-13 11:21:17 -05:00
Alex Gleason
dc8010a78e getClientConnectUri: fix description value 2024-05-12 13:33:22 -05:00
Alex Gleason
3b0739f187 Add a getClientConnectUri function, add "Nostr Connect" link in the OAuth form 2024-05-12 13:12:46 -05:00
Alex Gleason
bdfa6f8826 Add a getInstanceMetadata function to DRY a few controllers 2024-05-12 12:32:40 -05:00
Alex Gleason
928ae4ec22 oauthController: calculate the script hash on the fly so we can edit it 2024-05-12 10:56:27 -05:00
Alex Gleason
65034a4aae Support Explicit Addressing 2024-05-11 14:34:02 -05:00
P. Reis
04968fefaa test(MuteListPolicy): update error msg 2024-05-11 14:02:24 -03:00
P. Reis
fe66937bba feat: do not allow deactivated accounts to post 2024-05-11 12:04:44 -03:00
P. Reis
801e68c6c4 fix: add error prefix according to NIP-01 2024-05-11 12:03:41 -03:00
Alex Gleason
d278fc980a Merge branch 'fix-reports-no-kind-0' into 'main'
renderAdminAccount - Get account from pubkey if there is no kind 0 in the database

Closes #122

See merge request soapbox-pub/ditto!243
2024-05-10 22:20:23 +00:00
Alex Gleason
c017770760 ! -> ?. 2024-05-10 22:17:44 +00:00
P. Reis
323e425e8b fix(renderAdminReport): make sure reportedPubkey is not undefined 2024-05-10 19:05:15 -03:00
Alex Gleason
d142ce618d Merge branch 'feat-create-mute-policy' into 'main'
Create MuteListPolicy

See merge request soapbox-pub/ditto!242
2024-05-10 21:35:13 +00:00
P. Reis
732cb45b1e test(UserStore): update with 100.00% code coverage 2024-05-10 18:20:00 -03:00
P. Reis
4fdf15761c refactor(UserStore): remove isMuted function 2024-05-10 18:18:55 -03:00
P. Reis
3970bb81f7 refactor(MuteListPolicy): simplify condition 2024-05-10 18:03:35 -03:00
P. Reis
d3b7668a1e fix: create renderAdminAccountFromPubkey and use it if reported account doesn't have a kind 0 2024-05-10 16:51:07 -03:00
Alex Gleason
282612b53c Add an eventFixture function to import fixtures in tests 2024-05-10 14:10:19 -05:00
P. Reis
4069ddc02c refactor(MuteListPolicy): human lint preference 2024-05-10 14:37:02 -03:00
P. Reis
86518dbac5 refactor(MuteListPolicy): shorthand private constructor 2024-05-10 14:34:48 -03:00
P. Reis
ebeec2ccba test: MuteListPolicy with 100.00% code coverage 2024-05-10 11:26:15 -03:00
P. Reis
26dd4606ed test: UserStore with 100.00% code coverage 2024-05-10 10:35:04 -03:00
P. Reis
0c0465f131 refactor(UserStore): move mute logic to separate function & create isMuted() function 2024-05-10 10:31:34 -03:00
P. Reis
c85f31f63f feat: create MuteListPolicy class 2024-05-10 10:19:15 -03:00
Alex Gleason
afcf28b506 Merge branch 'admin-accounts-perform-action' into 'main'
Implement Mastodon API - perform action against an account

Closes #114

See merge request soapbox-pub/ditto!240
2024-05-09 16:46:54 +00:00