Commit graph

189 commits

Author SHA1 Message Date
Nutomic 24756af84b
Live reload settings (fixes #2508) (#2543)
* Live reload rate limit settings (fixes #2508)

* fix tests
2022-11-16 14:06:22 -05:00
Nutomic 83d2959b4b
Update doku dependency for easier formatting of defaults.hjson (#2553) 2022-11-11 16:01:29 -05: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
Nutomic ceae0f5993
Use urlencoding for db url params (fixes #2532) (#2537) 2022-11-07 21:29:32 -05:00
Nutomic 9393195827
Send error message when rate limit is reached (#2527)
* Send error message when rate limit is reached

* l18n key
2022-11-03 18:13:40 +00:00
Dessalines cb753b045f
Group imports dess (#2526)
* Group imports with rustfmt

* Running cargo fmt again.

Co-authored-by: Felix Ableitner <me@nutomic.com>
2022-11-02 15:18:22 -04:00
Nutomic 28eade6168
Fix invalid config in docker/prod (fixes #2520) (#2524) 2022-11-02 18:50:09 +00:00
Nutomic b0c3185663
Make verify apub url function async (#2514)
* Make verify apub url function async

* cleanup

* use dep from crates.io

* dont use unwrap
2022-10-28 09:38:22 -04: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
Dessalines ae95f5928e
Adding email admins for new applications. Fixes #2271 (#2390)
* Adding email admins for new applications. Fixes #2271

* Fix error.

Co-authored-by: Nutomic <me@nutomic.com>
2022-09-27 12:48:44 -04:00
Dessalines c9f1407429
Diesel 2.0.0 upgrade (#2452)
* Initial commit to bump diesel to 2.0.0-rc.0 and see what happens

* Add chrono feature from diesel

* db_schema crate is close to building?

* Upgrade diesel-derive-newtype

* Mostly modifying references to connections to be mutable ones; also used
new way to do migrations as suggested by the migration guide; a lot more
compiles now, though I can't figure out this tricky ToSql issue at the
moment

* Running clippy --fix

* Trying to fix drone clippy 1

* Fix clippy

* Upgrade clux-musl

* Trying to fix drone clippy 2

* Trying to fix drone clippy 3

* Trying to fix drone clippy 5

* Adding diesel table aliases, removing sql view hack. Fixes #2101

Co-authored-by: Steven Chu <stevenc1@gmail.com>
Co-authored-by: Nutomic <me@nutomic.com>
2022-09-26 14:09:32 +00:00
Dessalines 265dc54627
Increase default search rate limit. (#2424) 2022-09-03 11:37:27 +02:00
Nutomic 7094a0c0a4
Use doku release version (ref #2343) (#2386) 2022-08-02 15:38:19 +02:00
Dessalines 8bfeb4b627
Fix a few form options for diesel. Fixes #2287 (#2376)
* Fix a few form options for diesel. Fixes #2287

* Adding TODO comment.
2022-07-29 15:04:21 +02:00
Nutomic 16fe149a6d
Change config pictrs key name (#2360) 2022-07-14 14:25:10 -04:00
Nutomic d0a3d99636
Config changes, remove unused image purge function (#2343)
* Throw error if old pictrs config item is used, make api key optional

* use doku url feature

* fix doku version

* fix clippy

* remove unused image purge function, remove config migration
2022-07-11 16:38:37 -04:00
Luna e33736ae47
remove parking_lot (#2350) 2022-07-11 17:12:12 +00:00
Nutomic 587a0de8f7
Specify minimum Rust version 1.57 (fixes #2333) (#2334)
* Specify minimum Rust version 1.57 (fixes #2333)

* use latest rust for clippy

* use rust 1.60 for clippy

* no add component

* use official rust docker

* comments
2022-06-28 17:44:55 -04:00
Dessalines a745fa6f43
Remove update and read site config. Fixes #2306 (#2329)
* Remove update and read site config. Fixes #2306

* Removing lazy_static, removing Settings::get()
2022-06-22 20:24:54 +00:00
Nutomic cd4d235171
Move setting http_fetch_retry_limit into federation block (#2314) 2022-06-14 01:20:30 -04:00
Dessalines 4e12e25c59
Adding admin purging of DB items and pictures. #904 #1331 (#1809)
* First pass at adding admin purge. #904 #1331

* Breaking out purge into 4 tables for the 4 purgeable types.

* Using CommunitySafe instead in view

* Fix db_schema features flags.

* Attempting to pass API key.

* Adding pictrs image purging

- Added pictrs_config block, for API_KEY
- Clear out image columns after purging

* Remove the remove_images field from a few of the purge API calls.

* Fix some suggestions by @nutomic.

* Add separate pictrs reqwest client.

* Update defaults.hjson

Co-authored-by: Nutomic <me@nutomic.com>
2022-06-13 19:15:04 +00:00
Nutomic fcaf7a084c
Upgrade activitypub_federation to 0.2.0, add setting federation.debug (#2300) 2022-06-08 11:45:39 -04:00
Nutomic 7bc2f9fd6d
Remove unused setup config vars (#2302) 2022-06-08 11:44:53 -04:00
Paolo Barbolini 0a3b69a259
Bump lettre to 0.10.0-rc.7 (#2297) 2022-06-04 22:07:38 -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
Dessalines 1bd57ee5ca Version 0.16.5 2022-05-30 18:32:31 -04:00
Dessalines 69106589ba Fix publish 2022-05-26 16:10:36 -04:00
Paolo Barbolini ef12cd9588
Bump lettre to 0.10.0-rc.6 (#2250) 2022-05-09 23:08:13 +00:00
Paolo Barbolini 559e43075a
Simplify building plain/html emails (#2251) 2022-05-08 17:00:12 +00:00
Nutomic 3aa3d75a1e
Add cargo feature for building lemmy_api_common with mininum deps (#2243) 2022-05-03 17:44:13 +00:00
Nutomic 2e01e8e42c
Remove unused dependencies (#2239) 2022-04-27 17:56:05 +02:00
Nutomic 56b7030901
Fix link metadata unit test (#2237) 2022-04-27 15:42:10 +00:00
Nutomic 00b0b26dfa
Add default post listing type (fixes #2195) (#2209)
* Add default post listing type (fixes #2195)

* review fixes

* change column type
2022-04-19 19:05:08 +00:00
Dessalines 24be9f2cd5
Show deny reason to users after a failed login. Fixes #2191 (#2206)
* Show deny reason to users after a failed login. Fixes #2191

* Updating translations.

* Adding registration_denied translated string.
2022-04-19 10:48:59 +00:00
Dessalines 0a36b16e29
Fix allowlist / blocklist description location. Fixes #2214 (#2215)
* Fix allowlist / blocklist description location. Fixes #2214

* Fix allowlist check
2022-04-13 18:27:56 +00:00
Dessalines c232564fda Version 0.16.3 2022-04-08 10:20:31 -04:00
Dessalines 4878848955 Version 0.16.3-rc.1 2022-04-08 09:17:00 -04:00
Dessalines 4052900d30 Updating translations 2022-04-08 09:13:46 -04:00
Nutomic c7f5337099
Run cargo upgrade (#2176)
* Run cargo upgrade and cargo update

* Fixing validation (#2179)

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2022-04-01 18:37:51 +00:00
Dessalines 4cf0da7b60 Clippy fixes. 2022-03-30 10:58:03 -04:00
Nutomic ad7e6d99ed
Add email translations (#2175) 2022-03-29 18:23:03 +00:00
Dessalines d5a213760d Version 0.16.2 2022-03-29 12:56:21 -04:00
Dessalines f7fa1f10f9 Updating translations. 2022-03-29 12:07:39 -04:00
Dessalines 7bb8069224 Version 0.16.2-rc.3 2022-03-29 11:54:13 -04:00
Dessalines e16821116e
Lowering search rate limit. Fixes #2153 (#2154)
* Lowering search rate limit. Fixes #2153

* Adding a search rate limit.

* Forgot to add the websocket search rate limit

* Fix wrong op
2022-03-29 15:46:03 +00:00
Dessalines a11b5b107d Version 0.16.2-rc.2 2022-03-26 21:37:12 -04:00
Dessalines f2a0841586
Rate limit websocket joins. (#2165)
* Rate limit websocket joins.

* Removing async on mutex lock fn.

* Removing redundant ip

* Return early if check fails.
2022-03-27 00:29:05 +00:00
Nutomic a5ff629b24
Dont log errors when rate limit is hit (fixes #2157) (#2161)
* Dont log errors when rate limit is hit (fixes #2157)

* Clone service rather than http request

* some cleanup/refactoring

Co-authored-by: Aode (Lion) <asonix@asonix.dog>
2022-03-25 16:41:38 +01:00
Dessalines c681bb79b1 Version 0.16.2-rc.1 2022-03-24 18:25:21 -04:00
Dessalines 2da0684e95 Removing check_only 2022-03-24 16:29:08 -04:00