Commit graph

22 commits

Author SHA1 Message Date
Nutomic 6f3bf4634b
Various pedantic clippy fixes (#2568)
* Various pedantic clippy fixes

* more clippy pedantic fixes

* try to fix ci

* add fix clippy script, use rust 1.65

* fix clippy
2022-11-19 04:33:54 +00:00
Dessalines 5d837780f5
Add diesel_async, get rid of blocking function (#2510)
* Moving settings to Database.

- Moves many settings into the database. Fixes #2285
- Adds a local_site and instance table. Fixes #2365 . Fixes #2368
- Separates SQL update an insert forms, to avoid runtime errors.
- Adds TypedBuilder to all the SQL forms, instead of default.

* Fix weird clippy issue.

* Removing extra lines.

* Some fixes from suggestions.

* Fixing apub tests.

* Using instance creation helper function.

* Move forms to their own line.

* Trying to fix local_site_data, still broken.

* Testing out async

* Testing out async 2

* Fixing federation tests.

* Trying to fix check features 1.

* Starting on adding diesel async. 1/4th done.

* Added async to views and schema.

* Adding some more async

* Compiling now.

* Added diesel async. Fixes #2465

* Running clippy --fix

* Trying to fix cargo test on drone.

* Trying new muslrust.

* Trying a custom dns

* Trying a custom dns 2

* Trying a custom dns 3

* Trying a custom dns 4

* Trying a custom dns 5

* Trying a custom dns 6

* Trying a custom dns 7

* Addressing PR comments.

* Adding check_apub to all verify functions.

* Reverting back drone.

* Fixing merge

* Fix docker images.

* Adding missing discussion_languages.

* Trying to fix federation tests.

* Fix site setup user creation.

* Fix clippy

* Fix clippy 2

* Test api faster

* Try to fix 1

* Try to fix 2

* What are these lines about

* Trying to fix 3

* Moving federation test back to top.

* Remove logging cat.
2022-11-09 10:05:00 +00:00
Dessalines 235cc8b228
Moving settings to Database. (#2492)
* Moving settings to Database.

- Moves many settings into the database. Fixes #2285
- Adds a local_site and instance table. Fixes #2365 . Fixes #2368
- Separates SQL update an insert forms, to avoid runtime errors.
- Adds TypedBuilder to all the SQL forms, instead of default.

* Fix weird clippy issue.

* Removing extra lines.

* Some fixes from suggestions.

* Fixing apub tests.

* Using instance creation helper function.

* Move forms to their own line.

* Trying to fix local_site_data, still broken.

* Fixing federation tests.

* Trying to fix check features 1.

* Addressing PR comments.

* Adding check_apub to all verify functions.
2022-10-27 09:24:07 +00:00
Nutomic b7a2677b4d
Be more explicit about returning deleted actors or not (#2335)
* Be more explicit about returning deleted actors or not

* simplify db queries
2022-07-05 17:40:44 -04:00
Nutomic a2a594b763
Extract Activitypub logic into separate library (#2288)
* Create example for apub lib

* some rewriting of apub lib

* Add LocalInstance struct for apub lib to avoid using Lemmy Settings

* Move ActorType trait to lemmy_apub, because its not needed in library

* Use reqwest_retry instead of custom impl, dont specify timeout on every send()

* Some improvements to example

* Moved inbox handling to library

* bug fixes

* Move context and serde helpers into library

* wip: example changes

* Add lemmy_utils feature to build only LemmyError

* Rename to activitypub_federation

* Remove lemmy_utils dep from activitypub_federation using generic error type

* Finish activitypub example

* Cleanup and fix tests

* Reorganize library files

* Remove ApubObject.to_tombstone()

* Extract activitypub library into separate git repository
2022-06-02 16:33:41 +02:00
Nutomic 3aa3d75a1e
Add cargo feature for building lemmy_api_common with mininum deps (#2243) 2022-05-03 17:44:13 +00:00
Dessalines 4cf0da7b60 Clippy fixes. 2022-03-30 10:58:03 -04:00
Nutomic 4a23ee4d8b
Dont make webfinger request when viewing community/user profile (fixes #1896) (#2049) 2022-01-27 16:39:22 +00:00
Nutomic 2544341e47
Put community last in webfinger response (fixes #2037) (#2047) 2022-01-21 21:00:17 +00:00
Felix Ableitner da89ea22fb Fix Smithereen webfinger, remove duplicate webfinger impl (fixes #1916) 2021-11-18 19:28:53 +01:00
Felix Ableitner 579ca37ddf Make webfinger standard compliant 2021-11-16 18:03:09 +01:00
Felix Ableitner 9a1fe154db Remove header guard for activitypub routes 2021-11-10 15:08:33 +01:00
Felix Ableitner f24999027e Merge crates db_schema and db_queries 2021-10-20 12:28:08 +02:00
Dessalines 8708ad1b44 Moving settings and secrets to context. 2021-09-27 11:25:26 +02:00
Felix Ableitner 251e0d3b82 Move resolving of activitypub objects to separate api endpoint (fixes #1584) 2021-08-20 12:35:50 +02:00
Dessalines 7b8cbbba85
Simplify config using macros (#1686)
Co-authored-by: Felix Ableitner <me@nutomic.com>
2021-08-04 21:13:51 +00:00
Felix Ableitner 249fcc5066 Split api crate into api_structs and api 2021-03-25 20:19:40 +01:00
Dessalines 7c039340ed 2nd pass. JWT now uses local_user_id 2021-03-11 17:47:44 -05:00
Dessalines ddf4a667b1 ~80% done 2021-03-10 17:33:55 -05: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
Felix Ableitner 3bdd78f341 Rename lemmy_structs to lemmy_api_structs 2021-03-01 14:08:41 +01:00
Felix Ableitner 999d9f4d6c Move routes into separate crate to speed up compilation 2021-02-09 19:34:36 +01:00
Renamed from src/routes/webfinger.rs (Browse further)