Commit Graph

68 Commits

Author SHA1 Message Date
Nutomic
c7de1fcf24
Apub inbox rewrite (#1652)
* start to implement apub inbox routing lib

* got something that almost works

* it compiles!

* implemented some more

* move library code to separate crate (most of it)

* convert private message handlers

* convert all comment receivers (except undo comment)

* convert post receiver

* add verify trait

* convert community receivers

* add cc field for all activities which i forgot before

* convert inbox functions, add missing checks

* convert undo like/dislike receivers

* convert undo_delete and undo_remove receivers

* move block/unblock activities

* convert remaining activity receivers

* reimplement http signature verification and other checks

* also use actor type for routing, VerifyActivity and SendActivity traits

* cleanup and restructure apub_receive code

* wip: try to fix activity routing

* implement a (very bad) derive macro for activityhandler

* working activity routing!

* rework pm verify(), fix tests and confirm manually

also remove inbox username check which was broken

* rework following verify(), fix tests and test manually

* fix post/comment create/update, rework voting

* Rewrite remove/delete post/comment, fix tests, test manually

* Rework and fix (un)block user, announce, update post

* some code cleanup

* rework delete/remove activity receivers (still quite messy)

* rewrite, test and fix add/remove mod, update community handlers

* add docs for ActivityHandler derive macro

* dont try to compile macro comments
2021-07-17 12:08:46 -04:00
Dessalines
904709e3f1 Upgrade api_test deps 2021-07-06 10:57:54 -04:00
Dessalines
f196f05f20
Upgrading api test deps (#1608) 2021-05-28 15:46:23 +00:00
Nutomic
aa79c5131f
Implement federated bans (fixes #1298) (#1553)
* Implement federated bans (fixes #1298)

* mod actions should always be federated to affected user, in addition to followers

* Make Undo/Block work for remote mods

* clippy fix

* fix federation test

* vscodium doesnt auto-save changes...
2021-04-09 11:01:26 -04:00
Dessalines
c3d64f996e
Removing community.creator column. Fixes #1504 (#1541)
* Removing community.creator column. Fixes #1504

* Fixing unit tests.

* Fixing federation tests.
2021-04-08 11:29:08 +00:00
Dessalines
bf7558830f Changing preferred to display name. Fixes #1211 2021-04-01 13:57:45 -04:00
Dessalines
2309088b03 Renaming to api/v3 2021-03-29 11:26:15 -04:00
Dessalines
c2f8695c9a Version 0.10.0-rc.12 2021-03-25 15:22:07 -04:00
Felix Ableitner
4f54108a9c Merge branch 'main' into federated-moderation 2021-03-19 17:11:34 +01:00
Felix Ableitner
4f7dca7c2b Fix three federation test cases 2021-03-18 17:02:15 +01:00
Dessalines
434fb53dd1 Trying to fix API tests. 2021-03-12 14:09:03 -05:00
Felix Ableitner
66946117e1 Upgrade Rust version 2021-03-01 18:46:56 +01:00
Dessalines
462c4a2954
Rewrite settings implementation. Fixes #1270 (#1433)
* A first attempt at using deser-hjson. Fixes #1270

* Trying to fix tests, try 1

* Trying to fix tests, try 2

* A few fixes to deser_hjson

- Removing unwrap_or_defaults, using impl functions.
- Reorganized settings

* Make clippy happy

* hjson list strings must be quoted.

* Adding support for env vars.

* Moving to structs and defaults file.

* Moving settings default and struct.
2021-03-01 17:24:11 +00:00
Dessalines
cf911c023d
Add listing type to list communities (#1380)
* Adding listing type to ListCommunities. Fixes #1379

* Upgrading lemmy-js-client.
2021-01-26 12:18:01 -05:00
Dessalines
ee03cf8ae9
Explicit error http status codes (#1362)
* Trying to type specific errors.

* Using @asonix 's downcast method.
2021-01-21 16:32:19 +00:00
Dessalines
1de8a4606a A few API v2 changes based on nutomic's suggestions.
- Changed `edit_id` s to their type (comment_id)
- Moved websocket actions to their own file in structs and api.
- Got rid of UserViewDangerous, added UserSafeSettings.
  - GetSite now returns UserSafeSettings for `my_user`.
- Got rid of `admin` field in `Register`.
2021-01-18 16:57:31 -05:00
Dessalines
1e0c32f7a3 Merge branch 'main' into move_views_to_diesel 2021-01-05 23:55:02 -05:00
Dessalines
61c6f33103 Trying to fix save user settings. 2021-01-04 14:09:53 -05:00
dependabot[bot]
632d8f384a
Bump node-notifier from 8.0.0 to 8.0.1 in /api_tests (#1332)
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-04 11:29:04 -05:00
Dessalines
929f1d02b5 Fixing integration tests. 2020-12-20 22:27:27 -05:00
Dessalines
d767dd998e Merge branch 'drone-io-dess' into move_views_to_diesel_drone 2020-12-20 21:48:29 -05:00
Dessalines
5af8257e19 Changing unit tests to api v2. 2020-12-20 16:16:57 -05:00
Dessalines
9d0709dfe8 Trying again. 2020-12-17 21:55:15 -05:00
Dessalines
2e5297e337 Trying again. 2020-12-17 21:36:59 -05:00
Dessalines
5c266302c5 Adding unfollows. 2020-12-17 21:10:20 -05:00
Dessalines
caaf6b178b Trying again. 2020-12-17 15:35:28 -05:00
Dessalines
583808d5e7 Trying again. 2020-12-17 14:59:53 -05:00
Dessalines
5768a4eda7 Trying again. 2020-12-17 14:36:22 -05:00
Dessalines
4997d4b0b5 Trying again. 2020-12-17 14:23:15 -05:00
Dessalines
179709cc09 Fixing drone tests. 2020-12-17 14:01:33 -05:00
Felix Ableitner
e492cce206 Allow running docker-less federation tests locally 2020-12-15 14:58:11 +01:00
Felix Ableitner
d5955b60c0 silence lemmy output in federation logs 2020-12-14 18:01:12 +01:00
Felix Ableitner
f33577b317 send activities sync for tests 2020-12-14 17:44:27 +01:00
Dessalines
ccd26bfcd7 Trying to fix post test again. 2020-12-12 10:45:14 -05:00
Dessalines
f6ba6d5590 Trying to fix post test again. 2020-12-12 10:28:28 -05:00
Dessalines
dfe17662df Trying to fix post test again. 2020-12-12 09:39:41 -05:00
Dessalines
28c217eb66 Trying to fix post test again. 2020-12-11 23:20:18 -05:00
Dessalines
d594005d49 Trying to fix post test again. 2020-12-11 20:20:14 -05:00
Dessalines
4410d2e44d Trying to fix post test again. 2020-12-11 19:59:45 -05:00
Dessalines
5dff60adc5 Trying to fix post test again. 2020-12-11 16:26:44 -05:00
Dessalines
9e5824df85 Trying to fix post test. 2020-12-11 15:24:28 -05:00
Felix Ableitner
543be801ab disable debug log 2020-12-11 20:56:14 +01:00
Felix Ableitner
ab6b28ee60 use dash 2020-12-11 20:39:54 +01:00
Felix Ableitner
0c89e9c2d6 use hosts file 2020-12-11 18:22:16 +01:00
Felix Ableitner
30a1a69850 setup db 2020-12-11 18:09:47 +01:00
Felix Ableitner
9c7f2cb0c3 fix bin path 2020-12-11 17:33:55 +01:00
Felix Ableitner
b61bfcefa7 find the binary 2020-12-11 17:27:18 +01:00
Felix Ableitner
7c12b1026c faster release build 2020-12-11 17:01:05 +01:00
Felix Ableitner
5b376de5f5 need to use release bin 2020-12-11 16:25:20 +01:00
Felix Ableitner
df2ec0aa38 try running federation tests in same alpine version 2020-12-11 14:13:30 +01:00