]> Untitled Git - lemmy.git/log
lemmy.git
16 months agoReduce memory usage of rate limiting (#3111)
dullbananas [Wed, 21 Jun 2023 08:28:20 +0000 (01:28 -0700)]
Reduce memory usage of rate limiting (#3111)

* Reduce Vec allocations

* Optimize stuff

* Move embedded migrations to separate crate

* Revert "Move embedded migrations to separate crate"

This reverts commit 44b104997016ee2a1f2c0bb735b75e654666860d.

* clippy, fmt

* Shrink rate limit allowance to f32

* Initialize rate limit allowance directly

* Add removal of old rate limit buckets

* Improve readability

* Remove usage of is_okay_and for Rust 1.67 compatibility

* Add dhat-heap feature

* Fix api_benchmark.sh and add run_and_benchmark.sh

* Revert "Fix api_benchmark.sh and add run_and_benchmark.sh"

This reverts commit b4528e5b85dd3f13cea43d72ada9382200c8fc77.

* Revert "Add dhat-heap feature"

This reverts commit 08e835d487b983c44ce2570d8c396d570d426916.

* Manually revert remaining stuff

* Use Ipv6Addr in RateLimitStorage

* Shrink last_checked in RateLimitBucket to 32 bits

* Fix rate_limit::get_ip

* Stuff (#1)

* Update rate_limiter.rs

* Update mod.rs

* Update scheduled_tasks.rs

* Fix rate_limiter.rs

* Dullbananas patch 1 (#2)

* Update rate_limiter.rs

* Update mod.rs

* Update scheduled_tasks.rs

* Fix rate_limiter.rs

* Rate limit IPv6 addresses in groups

* Fmt lib.rs

* woodpicker trigger

* Refactor and comment `check_rate_limit_full`

* Add `test_split_ipv6`

* Replace -2.0 with UNINITIALIZED_TOKEN_AMOUNT

* Add `test_rate_limiter`

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
16 months agoAdding current domain from settings to CORs. (#3231)
Dessalines [Wed, 21 Jun 2023 00:29:48 +0000 (20:29 -0400)]
Adding current domain from settings to CORs. (#3231)

16 months agoremove debugging println (#3227)
Joel Beckmeyer [Tue, 20 Jun 2023 18:20:20 +0000 (14:20 -0400)]
remove debugging println (#3227)

16 months agoFixing comment_view unit tests. (#3224)
Dessalines [Tue, 20 Jun 2023 18:14:08 +0000 (14:14 -0400)]
Fixing comment_view unit tests. (#3224)

16 months agoFix parameter ordering for new_report_subject string (#3210)
Sander Saarend [Tue, 20 Jun 2023 15:24:04 +0000 (18:24 +0300)]
Fix parameter ordering for new_report_subject string (#3210)

16 months agoMove cors default to source code (#3219)
Nutomic [Tue, 20 Jun 2023 15:19:03 +0000 (17:19 +0200)]
Move cors default to source code (#3219)

16 months agoFixing tag deploys. (#3216)
Dessalines [Tue, 20 Jun 2023 14:29:24 +0000 (10:29 -0400)]
Fixing tag deploys. (#3216)

* Fixing tag deploys.

* Fixing tag deploys 2.

* Try to comment build_args.

* Fixing tag deploys 3.

* Fixing build args again.

* Last fix.

16 months agoFeature add hours as sorting options backend (#3161)
Ivo Barros [Tue, 20 Jun 2023 14:05:43 +0000 (15:05 +0100)]
Feature add hours as sorting options backend (#3161)

* add hours as sorting options

* ran cargo +nightly fmt

* woodpicker trigger

16 months agoDon't check verified email when an admin logs in (#3209)
kartikynwa [Tue, 20 Jun 2023 12:52:21 +0000 (18:22 +0530)]
Don't check verified email when an admin logs in (#3209)

Workaround for instance admins getting locked out when they turn on
the email verification requirement without having verified their
own email.

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
16 months agofix: add CORS origin environment variable (#3191)
Andrew DeLisa [Tue, 20 Jun 2023 12:29:38 +0000 (08:29 -0400)]
fix: add CORS origin environment variable (#3191)

* fix: add CORS origin environment variable

* chore: formatting

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
16 months agomake embedded pict-rs port configurable (#3201)
Joel Beckmeyer [Tue, 20 Jun 2023 11:07:18 +0000 (07:07 -0400)]
make embedded pict-rs port configurable (#3201)

16 months agoMove connection creation into scheduler. (#3120)
Dessalines [Tue, 20 Jun 2023 09:33:03 +0000 (05:33 -0400)]
Move connection creation into scheduler. (#3120)

* Move connection creation into scheduler.

- #3076

* Fix clippy.

16 months agoUpdate translations
Felix Ableitner [Tue, 20 Jun 2023 08:59:27 +0000 (10:59 +0200)]
Update translations

16 months agoCalculate initial hot_rank and hot_rank_active for posts and comments from other...
Sander Saarend [Tue, 20 Jun 2023 08:52:51 +0000 (11:52 +0300)]
Calculate initial hot_rank and hot_rank_active for posts and comments from other instances (#3131)

* Calculate initial hot_rank when receiving posts and comments from other instances

* Move hot rank update logic into db_schema

16 months agoChanged github issue template to align logically with the question asked (#3135)
ludrol [Fri, 16 Jun 2023 15:56:21 +0000 (17:56 +0200)]
Changed github issue template to align logically with the question asked (#3135)

16 months agoUpdate README.md (#3137)
Chethan [Fri, 16 Jun 2023 15:54:12 +0000 (21:24 +0530)]
Update README.md (#3137)

The Ace of Spades video linked in the README was private, have replaced it with a public video.

16 months agoRemove e-mail verification success e-mails (#3124)
Sander Saarend [Fri, 16 Jun 2023 15:53:33 +0000 (18:53 +0300)]
Remove e-mail verification success e-mails (#3124)

16 months agoFix Hidden communities showing in community list (#3094)
Alex Maras [Thu, 15 Jun 2023 11:39:58 +0000 (19:39 +0800)]
Fix Hidden communities showing in community list (#3094)

* Only show hidden communities when explicitly searching for them rather then in "all"

* dont set hidden to false when creating and updating - let DB set default

* lint

---------

Co-authored-by: Alex Maras <alexmaras@gmail.com>
16 months agoUpdate all dependencies (#3091)
Nutomic [Thu, 15 Jun 2023 09:37:05 +0000 (11:37 +0200)]
Update all dependencies (#3091)

16 months agoPrevent making an instance private if federation is enabled. (#3074)
Wyatt Smith [Thu, 15 Jun 2023 09:35:09 +0000 (02:35 -0700)]
Prevent making an instance private if federation is enabled. (#3074)

* Prevent making an instance private if federation is enabled.

* Added case where federation is enabled, check if the alternative setting is changed

* Merged the error messages for private instance/federation.

---------

Co-authored-by: Wyatt Smith <wys@dropbox.com>
16 months agoHandle scheduled task errors (#3090)
Sander Saarend [Thu, 15 Jun 2023 09:29:12 +0000 (12:29 +0300)]
Handle scheduled task errors (#3090)

* Add --disable-scheduled-tasks CLI flag

* Add error handling for scheduled tasks

16 months agoFix unapproved users being able to log in after registration mode set to closed....
Dessalines [Wed, 14 Jun 2023 23:02:17 +0000 (19:02 -0400)]
Fix unapproved users being able to log in after registration mode set to closed. (#3096)

- Fixes #3095

16 months agoLink tafkars in readme (#3087)
Nutomic [Wed, 14 Jun 2023 21:41:20 +0000 (23:41 +0200)]
Link tafkars in readme (#3087)

16 months agodoc: Added pythorhead library in readme (#3114)
Divided by Zer0 [Wed, 14 Jun 2023 21:40:49 +0000 (23:40 +0200)]
doc: Added pythorhead library in readme (#3114)

16 months agoOnly create ltree postgres extension in migration if doesn't already exist (#3092)
adisbladis [Wed, 14 Jun 2023 21:03:10 +0000 (09:03 +1200)]
Only create ltree postgres extension in migration if doesn't already exist (#3092)

16 months agoadd issue template yml from lemmy-ui (#3086)
Raymond Berger [Wed, 14 Jun 2023 20:21:03 +0000 (22:21 +0200)]
add issue template yml from lemmy-ui (#3086)

* add issue template yml from lemmy-ui

* prettier

* Empty-Commit for CI

* improve Qs

* add instance question

* delete hexbear

* backend version

16 months agoFix Issue #3075 by using None for local fields instead of Some(false) (#3088)
Neshura [Wed, 14 Jun 2023 12:34:45 +0000 (14:34 +0200)]
Fix Issue #3075 by using None for local fields instead of Some(false) (#3088)

* Set insert and update form "local" to None

* Extra space to retrigger woodpecker

* Resolve code review request

https://github.com/LemmyNet/lemmy/pull/3088#discussion_r1229336958

* Remove extra space after None,

16 months agostop requiring superuser to run migrations (#3002)
Charles Hall [Wed, 14 Jun 2023 11:54:12 +0000 (04:54 -0700)]
stop requiring superuser to run migrations (#3002)

Fixes <https://github.com/LemmyNet/lemmy/issues/2863>.

16 months agoFixes #1884 - Support Spoiler Tags (#3018)
Nina Blanson [Wed, 14 Jun 2023 11:15:59 +0000 (06:15 -0500)]
Fixes #1884 - Support Spoiler Tags (#3018)

* Fixes #1884 - Switches markdown libraries and creates a custom rule to manage spoiler blocks

* Add tests to cover invalid spoiler input

* Consolidate tests, add comments

* Make immutable, static instance of markdown parser

---------

Co-authored-by: Nutomic <me@nutomic.com>
16 months agoFix compilation
Felix Ableitner [Wed, 14 Jun 2023 09:34:29 +0000 (11:34 +0200)]
Fix compilation

16 months agoAlign default DB password with documentation (#3068)
Patrick Roe [Tue, 13 Jun 2023 20:23:07 +0000 (04:23 +0800)]
Align default DB password with documentation (#3068)

16 months agoUpdate RSS url (#3053)
JetpackJackson [Tue, 13 Jun 2023 20:17:02 +0000 (16:17 -0400)]
Update RSS url (#3053)

* Update RSS url

* Fixed next line

* making sure this thing uploads

* Update feeds.rs

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
16 months agoDocker yaml anchors and docker logs (#3027)
Edgar Alvarado [Tue, 13 Jun 2023 12:37:06 +0000 (08:37 -0400)]
Docker yaml anchors and docker logs (#3027)

* Use anchor for duplicated compose properties

* Include docker log max

* Run prettier

16 months agoFix ports used by docker (#3012)
Edgar Alvarado [Mon, 12 Jun 2023 22:38:27 +0000 (18:38 -0400)]
Fix ports used by docker (#3012)

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
16 months agoAdd limit and pagination to feeds (#2980)
Jared Schneiderman [Mon, 12 Jun 2023 21:48:02 +0000 (17:48 -0400)]
Add limit and pagination to feeds (#2980)

* adds limit and pagination to all rss feeds

* consistent ordering

* refactor page and limit and add after

* revert back to using page

* remove offset change

* refactor to impl adding helper methods

* clippy

16 months agoUpgrade activitypub-federation to 0.4.1 (#3039)
Nutomic [Mon, 12 Jun 2023 18:12:15 +0000 (20:12 +0200)]
Upgrade activitypub-federation to 0.4.1 (#3039)

This improves logging so that its not necessary to enable debug
logs to find out that activity worker count needs to be increased.

16 months agoAdding Lemmy-Swift-Client to README.md (#3026)
Charlie Fish [Mon, 12 Jun 2023 13:31:27 +0000 (07:31 -0600)]
Adding Lemmy-Swift-Client to README.md (#3026)

16 months agouse usize::MAX for line wrap length, since lettre does it for us (#3034)
Andy Brandt [Mon, 12 Jun 2023 13:29:15 +0000 (08:29 -0500)]
use usize::MAX for line wrap length, since lettre does it for us (#3034)

fixes #2921

16 months agoupdate doku (#3003)
Charles Hall [Mon, 12 Jun 2023 09:55:47 +0000 (02:55 -0700)]
update doku (#3003)

Fixes malformed documentation generated by previous version.

16 months agoFix contributing link (#3015)
Nathan Schulzke [Mon, 12 Jun 2023 09:04:47 +0000 (03:04 -0600)]
Fix contributing link (#3015)

16 months agoBetter issue templates. (#2991)
Dessalines [Fri, 9 Jun 2023 21:08:27 +0000 (17:08 -0400)]
Better issue templates. (#2991)

* Better issue templates.

* Fixing bug report.

16 months agoallow specifying db uri in config file (#2956)
Charles Hall [Fri, 9 Jun 2023 12:18:22 +0000 (05:18 -0700)]
allow specifying db uri in config file (#2956)

* allow specifying db uri in config file

* succumb to a bug in doku

See <https://github.com/anixe/doku/issues/33>.

16 months agoAdding hot_rank columns in place of function sorting. (#2952)
Dessalines [Thu, 8 Jun 2023 20:15:15 +0000 (16:15 -0400)]
Adding hot_rank columns in place of function sorting. (#2952)

* Adding hot_rank columns in place of function sorting.

- Creates hot_rank columns for post, comment, and community.
- Fixes #2932

* Updating all hot ranks on startup.

* Fixing post.url migration.

* Removing update_instance_software from startup.

* Adding post_rank query

16 months agomake shebangs posix compliant (#2974)
Charles Hall [Thu, 8 Jun 2023 19:38:26 +0000 (12:38 -0700)]
make shebangs posix compliant (#2974)

Previously, these scripts wouldn't work on exotic systems such as NixOS.

```
fd '\.sh$' -t f --exec sed -i 's@#!/bin/bash@#!/usr/bin/env bash@'
```

16 months agoFix private message e-mail notification subject and body (#2963)
Andy Brandt [Thu, 8 Jun 2023 17:42:32 +0000 (12:42 -0500)]
Fix private message e-mail notification subject and body (#2963)

It used to say:

Subject: Private message from [your username]
Body: [your username] - [private message]

It now display the correct username that it's from.

16 months agoAdd comment depth check (#2940)
Anon [Thu, 8 Jun 2023 14:31:26 +0000 (09:31 -0500)]
Add comment depth check (#2940)

* Add comment depth check

* Move comment depth code

* linter fix

16 months agoAdd `lemmyexternalproxy` to `lemmy` so that it can talk to the internet (#2960)
Jason Watkins [Thu, 8 Jun 2023 12:30:16 +0000 (05:30 -0700)]
Add `lemmyexternalproxy` to `lemmy` so that it can talk to the internet (#2960)

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
16 months agoFix translation build error (fixes #2967) (#2968)
Nutomic [Thu, 8 Jun 2023 11:12:40 +0000 (13:12 +0200)]
Fix translation build error (fixes #2967) (#2968)

16 months agoActivitypub breaking changes for Lemmy 0.18 (#2705)
Nutomic [Wed, 7 Jun 2023 19:18:17 +0000 (21:18 +0200)]
Activitypub breaking changes for Lemmy 0.18 (#2705)

* Remove deprecated field `group.moderators`

* Drop column local_site.federation_debug

* Remove backwards compatibility code for feature/lock post

https://github.com/LemmyNet/lemmy/pull/2716

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
16 months agoAdd db index for post.url column (#2929)
Nutomic [Wed, 7 Jun 2023 15:31:24 +0000 (17:31 +0200)]
Add db index for post.url column (#2929)

* Add db index for post.url column

As mentioned in https://github.com/LemmyNet/lemmy/issues/2877#issuecomment-1576439829

Not sure if its preferable to do this, or make a combined index
which includes post.nsfw, post.removed, post.deleted

* remove unique

16 months agoFall back to String for Comment::path when not using the full feature (#2941)
derivator [Wed, 7 Jun 2023 13:38:46 +0000 (15:38 +0200)]
Fall back to String for Comment::path when not using the full feature (#2941)

16 months agoupdate diesel to 2.1.0 and diesel-async to 0.3.0 (issue #2882) (#2895)
Carlrs [Wed, 7 Jun 2023 10:54:40 +0000 (10:54 +0000)]
update diesel to 2.1.0 and diesel-async to 0.3.0 (issue #2882) (#2895)

* update diesel to 2.1.0 and diesel-async to 0.3.0 (issue #2882)

* get rid of deprecated RawValue type alias usage, explicitly import diesel types instead of using wildcard import

* Update diesel-derive-enum and diesel-derive-newtype libraries

* Revert manual changes to schema.rs

* Update to newer diesel-cli image in CI, run fix-clippy before schema comparison, update schema to one generated with diesel-cli 2.1.0 and clippyfixed

* Remove wildcard import lint, fix diesel schema pipeline

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
16 months agoFix dev setups. (#2944)
Dessalines [Wed, 7 Jun 2023 02:22:21 +0000 (22:22 -0400)]
Fix dev setups. (#2944)

16 months agoSet version name for crates.io release (#2928)
Nutomic [Wed, 7 Jun 2023 00:24:06 +0000 (02:24 +0200)]
Set version name for crates.io release (#2928)

* Set version name for crates.io release

ref https://github.com/LemmyNet/lemmy-ui/issues/1052

* fix yml

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
16 months agoFix handling of follows addressed to single value (#2920)
vpzomtrrfrt [Tue, 6 Jun 2023 22:33:38 +0000 (16:33 -0600)]
Fix handling of follows addressed to single value (#2920)

* Fix handling of follows addressed to single value

* Switch to deserialize_skip_error for Follow to

* Also use deserialize_skip_error for AcceptFollow and UndoFollow

* actually import deserialize_skip_error

16 months agoRemove chatserver (#2919)
Nutomic [Tue, 6 Jun 2023 16:27:22 +0000 (18:27 +0200)]
Remove chatserver (#2919)

* Remove chatserver

* fix clippy

* Remove captchas (fixes #2922)

* fix prettier

* fix api_common build

* cargo fmt

16 months agoAdding taglines to SiteResponse. Fixes #2925 (#2926)
Dessalines [Tue, 6 Jun 2023 12:59:34 +0000 (08:59 -0400)]
Adding taglines to SiteResponse. Fixes #2925 (#2926)

* Adding taglines to SiteResponse. Fixes #2925

* Fixing CI line.

16 months agoFix *All* reports not showing. Fixes #2902 (#2903)
Dessalines [Tue, 6 Jun 2023 09:01:48 +0000 (05:01 -0400)]
Fix *All* reports not showing. Fixes #2902 (#2903)

* Fix *All* reports not showing. Fixes #2902

* Fix *All* reports not showing. Fixes #2902

* Fixing tests.

16 months agoREADME updates (#2913)
Matt Pusch [Mon, 5 Jun 2023 15:34:15 +0000 (08:34 -0700)]
README updates (#2913)

* Updated readme to remove unsecure sunchid lemming article - replaced with wikipedia article.

Commented out sponsor list as page DNE.

Commented out Contributing section as all sites DNE. Added simple instructions for git contribution. Cleaned up formatting for Contributing section.

TODO: update join-lemmy.org/docs, uncomment removed lines

* Implemented suggested changes

16 months agoFilter empty username strings from Mastodon (fixes #2886) (#2887)
Nutomic [Mon, 5 Jun 2023 11:56:53 +0000 (13:56 +0200)]
Filter empty username strings from Mastodon (fixes #2886) (#2887)

* Filter empty username strings from Mastodon (fixes #2886)

* add issue link

16 months agoUpdate humane tech badge to point to new repo (#2898)
Udo [Mon, 5 Jun 2023 10:49:32 +0000 (12:49 +0200)]
Update humane tech badge to point to new repo (#2898)

16 months agoUpdate to fix nginx proxy config for Docker Installs (#2908)
Justin Gauthier [Mon, 5 Jun 2023 10:43:31 +0000 (06:43 -0400)]
Update to fix nginx proxy config for Docker Installs (#2908)

* Update to fix nginx proxy config

* Update docker-compose.yml - fix type

---------

Co-authored-by: Jax Gauthier <jax@gauthier.id>
16 months agoRemove jaeger, opentelemetry from docker-compose (#2894)
Nutomic [Sun, 4 Jun 2023 20:16:49 +0000 (22:16 +0200)]
Remove jaeger, opentelemetry from docker-compose (#2894)

16 months agoReplace remmel with Mlem. (#2890)
Dessalines [Thu, 1 Jun 2023 20:40:47 +0000 (16:40 -0400)]
Replace remmel with Mlem. (#2890)

17 months agoAdd CORS support for debug mode. (#2884)
Dessalines [Mon, 29 May 2023 21:14:00 +0000 (17:14 -0400)]
Add CORS support for debug mode. (#2884)

17 months agoDon't filter comments of posts from blocked community when viewing post detail (...
phankydn [Mon, 29 May 2023 15:41:47 +0000 (22:41 +0700)]
Don't filter comments of posts from blocked community when viewing post detail (#2880)

17 months agoRemove websocket code (#2878)
Nutomic [Mon, 29 May 2023 14:44:20 +0000 (16:44 +0200)]
Remove websocket code (#2878)

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
17 months agoDont return error in case optional auth is invalid (#2879)
Nutomic [Thu, 25 May 2023 14:50:07 +0000 (16:50 +0200)]
Dont return error in case optional auth is invalid (#2879)

* Dont return error in case optional auth is invalid

* fixes

17 months agoRemove unnecessary clone (#2874)
phankydn [Tue, 23 May 2023 23:00:19 +0000 (06:00 +0700)]
Remove unnecessary clone (#2874)

Co-authored-by: KyP <phanky.vn@proton.me>
17 months agoRemove GetCommunityResponse.default_post_language (#2867)
Nutomic [Sun, 21 May 2023 15:55:32 +0000 (17:55 +0200)]
Remove GetCommunityResponse.default_post_language (#2867)

This field is unnecessary because we already set a default language
with the same logic if none is passed in CreatePost. So if the user
doesnt set a post language, it should simply be passed as None. This
also has the advantage that it works with clients that dont support
language tags.

Technically not a breaking change because its optional, but better
be safe.

17 months agoMerge pull request #2866 from LemmyNet/remove-reqwest-retry
Nutomic [Thu, 18 May 2023 15:19:54 +0000 (17:19 +0200)]
Merge pull request #2866 from LemmyNet/remove-reqwest-retry

Optimize fetching of post url metadata

17 months agoDont refetch post url metadata when post is received again
Felix Ableitner [Thu, 18 May 2023 11:22:05 +0000 (13:22 +0200)]
Dont refetch post url metadata when post is received again

17 months agoDont retry outgoing HTTP requests (ref #2865)
Felix Ableitner [Thu, 18 May 2023 11:11:06 +0000 (13:11 +0200)]
Dont retry outgoing HTTP requests (ref #2865)

17 months agoForce enable undetermined language (#2851)
Nutomic [Thu, 18 May 2023 14:34:21 +0000 (16:34 +0200)]
Force enable undetermined language (#2851)

* Force enable undetermined language

* update

* fix tests

17 months agoFix typo that caused error (#2861)
SleeplessOne1917 [Sun, 14 May 2023 18:02:05 +0000 (18:02 +0000)]
Fix typo that caused error (#2861)

17 months agoPrettier check (#2855)
Dessalines [Sat, 13 May 2023 20:50:58 +0000 (16:50 -0400)]
Prettier check (#2855)

* Adding prettier check to CI.

* Running prettier on codebase.

17 months agoDowngrade postgres for CI to 15.2 (fixes #2857) (#2859)
Nutomic [Fri, 12 May 2023 23:08:32 +0000 (01:08 +0200)]
Downgrade postgres for CI to 15.2 (fixes #2857) (#2859)

17 months agoMake volumes used in docker compose work when running on machines with SELinux enable...
SleeplessOne1917 [Fri, 12 May 2023 00:15:12 +0000 (00:15 +0000)]
Make volumes used in docker compose work when running on machines with SELinux enabled (#2853)

* Make volumes used in docker compose work when running on machines with SELinux enabled

* Switch lemmy-ui comments

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
17 months agoSet attribute `deny_unknown_fields` for Lemmy config (#2852)
Nutomic [Fri, 12 May 2023 00:12:12 +0000 (02:12 +0200)]
Set attribute `deny_unknown_fields` for Lemmy config (#2852)

With this attribute, Lemmy will throw an error and exit if any
invalid entry is found in the config file. I think can be useful
to notice typos or keys that were removed or renamed in an upgrade.
Currently you wouldnt notice these at all unless you manually
compare the config file with settings that are listed in documentation.

This should be considered a breaking change.

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
17 months agoFixing empty req issue. (#2849)
Dessalines [Thu, 11 May 2023 19:20:45 +0000 (15:20 -0400)]
Fixing empty req issue. (#2849)

* Fixing empty req issue.

* Forgot skip serializing none.

17 months agoUpgrade api_test deps (#2850)
Dessalines [Wed, 10 May 2023 20:31:37 +0000 (16:31 -0400)]
Upgrade api_test deps (#2850)

* Upgrade api_test deps

* Fix cargo fmt.

* Try to trigger a new format

17 months agoAdding comments to all API related types. Fixes #2846 (#2848)
Dessalines [Wed, 10 May 2023 19:20:39 +0000 (15:20 -0400)]
Adding comments to all API related types. Fixes #2846 (#2848)

18 months agoAdding typescript generation for API. Fixes #2824 (#2827)
Dessalines [Wed, 26 Apr 2023 04:26:10 +0000 (00:26 -0400)]
Adding typescript generation for API. Fixes #2824 (#2827)

* Adding typescript generation for API. Fixes #2824

* Try to fix Ltree issue 1.

* Forgot a few types.

* Fixing api tests.

* Removing url_serde line.

* Manually deriving TS for some types.

18 months agoAddressing slow profile queries. #2777 (#2830)
Dessalines [Tue, 25 Apr 2023 23:28:06 +0000 (19:28 -0400)]
Addressing slow profile queries. #2777 (#2830)

* Addressing slow profile queries. #2777

* Addressing PR comments.

18 months agoReverting to older non-multi-arch dockerfile. Fixes #2832 (#2833)
Dessalines [Tue, 25 Apr 2023 20:40:58 +0000 (16:40 -0400)]
Reverting to older non-multi-arch dockerfile. Fixes #2832 (#2833)

18 months agoAdd `to` field in follow activities for better compatibility (#2829)
Nutomic [Mon, 24 Apr 2023 21:19:08 +0000 (23:19 +0200)]
Add `to` field in follow activities for better compatibility (#2829)

* Add `to` field in follow activities for better compatibility (fixes #2744)

* fix tests

18 months agoUse older git clone for woodpecker. (#2831)
Dessalines [Mon, 24 Apr 2023 19:40:36 +0000 (15:40 -0400)]
Use older git clone for woodpecker. (#2831)

18 months agoRemove last Option<Vec.. from API. Fixes #2820 (#2822)
Dessalines [Fri, 21 Apr 2023 21:41:03 +0000 (17:41 -0400)]
Remove last Option<Vec.. from API. Fixes #2820 (#2822)

* Remove last Option<Vec.. from API. Fixes #2820

* Add empty allowed_instances check.

* Adding comment for allowed_instances.

18 months agoAdding cross_post fetching to GetPost. Fixes #2127 (#2821)
Dessalines [Wed, 19 Apr 2023 20:16:19 +0000 (16:16 -0400)]
Adding cross_post fetching to GetPost. Fixes #2127 (#2821)

18 months agoUse Dockerfile.multiarch as Dockerfile (#2818)
6543 [Tue, 18 Apr 2023 20:21:31 +0000 (22:21 +0200)]
Use Dockerfile.multiarch as Dockerfile (#2818)

* use Dockerfile.multiarch and delete old Dockerfile

* Dockerfile.multiarch -> Dockerfile

* nit

18 months agoAdding diesel enums for SortType and ListingType (#2808)
Dessalines [Mon, 17 Apr 2023 19:19:51 +0000 (15:19 -0400)]
Adding diesel enums for SortType and ListingType (#2808)

* Adding diesel enums for SortType and ListingType

- Uses diesel-derive-enum.
- Adds diesel.toml , so we can again use the auto-generated schema.rs
- Fixes a lot of DB null issues and column ordering issues.
- Fixes #1136
- Also replaces RegistrationMode boilerplate.

* Fixing unit tests 1.

* Remove comment line.

* Before patch.

* Before again.

* Using patch file to fix diesel_ltree issue with diesel.toml

* Adding some yalc ignores

* Fixing RegistrationMode enums

* Adding woodpecker diesel schema check.

* Try adding openssl 1.

* Try using diesel-cli image 1

* Try using diesel-cli image 2

* Try using diesel-cli image 3

* Try using diesel-cli image 4

* Try using diesel-cli image 5

* Try using diesel-cli image 6

* Try using diesel-cli image 7

* Try using diesel-cli image 8

* Try using diesel-cli image 9

* Try using diesel-cli image 10

* Try using diesel-cli image 11

* Try using diesel-cli image 12

* Try using diesel-cli image 13

18 months agoMake path to local lemmy-ui use correct relative path (#2817)
SleeplessOne1917 [Mon, 17 Apr 2023 17:38:59 +0000 (17:38 +0000)]
Make path to local lemmy-ui use correct relative path (#2817)

18 months agoAdd lemmy-bot to README libraries list (#2816)
SleeplessOne1917 [Mon, 17 Apr 2023 17:21:37 +0000 (17:21 +0000)]
Add lemmy-bot to README libraries list (#2816)

18 months agoSeparate federated_instances into its own endpoint. Fixes #1931 (#2813)
Dessalines [Sun, 16 Apr 2023 21:00:31 +0000 (17:00 -0400)]
Separate federated_instances into its own endpoint. Fixes #1931 (#2813)

18 months agoUse official rust image and clean up Dockerfiles (#2804)
6543 [Sun, 16 Apr 2023 16:56:12 +0000 (18:56 +0200)]
Use official rust image and clean up Dockerfiles (#2804)

* Add docker/Dockerfile.multiarch

* Update normal Dockerfile to be similar to multiarch one

* docker build run on x86 and arm64 now
manifest not needed, its handled by buildx plugin

* Rename Dockerfile.arm To Dockerfile.debian

* Emulate builder on arm target too

* fix misspell

* Improve Dockerfiles

* naming

* undo multiarchbuild settings as its blocked by a dependeny, see #2806

* Delete Dockerfile.debian

18 months agoTemporary fix for hiding deleted posts. #2624 (#2811)
Dessalines [Sun, 16 Apr 2023 00:23:36 +0000 (20:23 -0400)]
Temporary fix for hiding deleted posts. #2624 (#2811)

18 months agoLeave modded communities on account deletion. Fixes #2560 (#2810)
Dessalines [Sat, 15 Apr 2023 23:41:05 +0000 (19:41 -0400)]
Leave modded communities on account deletion. Fixes #2560 (#2810)

18 months agoAdding check to description and body length fields. (#2805)
Dessalines [Sat, 15 Apr 2023 14:45:11 +0000 (10:45 -0400)]
Adding check to description and body length fields. (#2805)

* Adding check to description and body length fields.

- Also making the checks return `LemmyError`
- Fixes #1747

* Address PR comments.

* PR comments 2

18 months agoFix & Optimize CI config (#2802)
6543 [Thu, 13 Apr 2023 20:33:00 +0000 (22:33 +0200)]
Fix & Optimize CI config (#2802)

* let the clone plugin handle submodules too

* start using yml aliase

* fix publish_to_crates_io

* CI.restart()

18 months agoMaking the chat server an actor. (#2793)
Dessalines [Thu, 13 Apr 2023 10:53:55 +0000 (06:53 -0400)]
Making the chat server an actor. (#2793)

* Making the chat server an actor.

- Fixes #2778
- #2787

* Forgot to add handlers folder.

* Some cleanup.

* Forgot to remove a comment.

* Address PR comments.

* Using ToString for enum operations.