Commit graph

28 commits

Author SHA1 Message Date
Nutomic
b96ce81f89
Move code to apub library (#1795)
* Remove dependency of apub_lib on LemmyContext

* Move ApubObject trait to library

* Reorganize files in apub lib

* Move ActorType, signatures, activity_queue to apub library
2021-10-06 16:20:05 -04:00
Felix Ableitner
c1db86925f Merge apub, apub_receive crates (fixes #1621) 2021-07-17 18:20:44 +02:00
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
2309088b03 Renaming to api/v3 2021-03-29 11:26:15 -04: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
929f1d02b5 Fixing integration tests. 2020-12-20 22:27:27 -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
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
Felix Ableitner
4fd6b5f5e1 fix script location 2020-12-10 21:36:50 +01:00
Felix Ableitner
405e7eff27 try to fix federation test 2020-12-10 21:14:05 +01:00
Felix Ableitner
7af4a60ec4 change dir to read config 2020-12-10 20:19:17 +01:00
Felix Ableitner
7b2c59bd98 use bash, install psql 2020-12-10 20:06:09 +01:00
Felix Ableitner
580e397525 dont use alpine for federation test 2020-12-10 19:50:41 +01:00
Felix Ableitner
7717deda0e more debug 2020-12-10 18:57:09 +01:00
Felix Ableitner
cdcbef088d more debugging 2020-12-10 18:50:15 +01:00
Felix Ableitner
94d6ceb4df install bash and curl 2020-12-10 18:29:13 +01:00
Felix Ableitner
200913f631 try with sh 2020-12-10 18:26:50 +01:00
Felix Ableitner
f76f742ba7 implement federation test in bash 2020-12-10 18:03:11 +01:00