Commit Graph

1256 Commits (main)

Author SHA1 Message Date
Dessalines 2133bcea4e Version 0.19.3 4 months ago
Nutomic 0868910570
Add secondary sort by published date for post view (fixes #4383) (#4384) 4 months ago
Dessalines df11d77a0d Updating translations. 4 months ago
Nutomic 3d6f7ff911
Revert "Dont ignore errors during login (fixes #4319) (#4321)" (#4380)
This reverts commit 4163e0465e.

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
4 months ago
Nutomic 516db012bf
Dont allow caching captcha response (#4381)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
4 months ago
Nutomic b58da11fb7
Mark instance as alive after successful activity send (fixes #4039) (#4377)
* Mark instance as alive after successful activity send (fixes #4039)

* clippy

* Instance::update

* domain

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
4 months ago
Nutomic 1be7dbde33
Count chars, not bytes for max title length (fixes #4366) (#4367)
* Count chars, not bytes for max title length (fixes #4366)

* fix api test
5 months ago
Nutomic 9240a653c0
Fix bug with Mastodon undo follow activities (#4364) 5 months ago
Dessalines 143fdb62b1 Updating translations. 5 months ago
Nutomic 2d16d12cb7
Move `publish = false` to correct place in lemmy_server (fixes #4359) (#4361) 5 months ago
Dessalines 3b717cfc88
Removing serde_skip from newest_comment_time. Fixes #4351 (#4360) 5 months ago
dullbananas 1ef90773e0
Refactor post view tests (#4313)
* Refactor post view tests

* Update post_view.rs

* Update post_view.rs

* Update post_view.rs

* Update post_view.rs

* Update post_view.rs

* Update post_view.rs

* Update post_view.rs

* remove unused import
5 months ago
Dessalines 2f09ad8e5b Version 0.19.2-rc.4 5 months ago
Nutomic e3b715002b
Handle federated reports from Mastodon, Kbin (#4323)
* Test Kbin/Mbin federation

* Handle reports from Mastodon/Kbin (fixes #4217)

* prettier

* revert

* add mastodon activity

* ci

* revert

* ci
5 months ago
Nutomic 4ca63c5641
Move apub context to join-lemmy.org (fixes #4234) (#4302)
* Move apub context to join-lemmy.org (fixes #4234)

* Dont store federation context in sent_activity table

* include basic activitypub context

* update lib

* ci
5 months ago
Felix Ableitner d3efebfa4e Version 0.19.2-rc.1 5 months ago
Dessalines 1856e7c0ca
Increasing max items for user settings import. (#4352)
- Fixes #4307
5 months ago
phiresky 0e6669f617
no endless loop if queue too recent (#4349) 5 months ago
Nutomic 7d9b59c467
Reduce default db pool size to 30, remove db timeout (ref #4282) (#4301)
* Reduce default db pool size to 30 (ref #4282)

* remove db timeout
5 months ago
Nutomic 38e64825e6
Add macro assert_length!() for tests (#4348)
* Add macro assert_length!() for tests

* fix

* number
5 months ago
Nutomic 3cad3b2119
Dont overwrite cache-control header in session middleware (#4337) 5 months ago
Nutomic 023c9f4fcd
Fix fetching of community posts (fixes #4283) (#4293)
* Fix fetching of community posts (fixes #4283)

Also use spawn_try_task to fetch community outbox, mods etc to avoid
delay/timeout when fetching new community.

* prettier

* fix test

* fix api test

* prettier

* add delay

* Update run-federation-test.sh

* fix test
5 months ago
ALEX11BR a5289dd4cf
Use `pretty_assertions` for assertions (#4347)
* Use `pretty_assertions` for assertions

* fixed ordering of `use`s

* ci

---------

Co-authored-by: Felix Ableitner <me@nutomic.com>
5 months ago
Dessalines 009a45dffb
Adding /post/like/list and /comment/like/list for admins. (#4332)
- Allows admins to view likes, sorted by downvotes first,
  for a given comment or post.
- Fixes #4088
5 months ago
phiresky 024ab7d530
Fix federate loop (#4330)
* make activity channel infallible

* clippy

* federate: make cancellabletask loop itself
5 months ago
Nutomic 4163e0465e
Dont ignore errors during login (fixes #4319) (#4321)
* Dont ignore errors during login (fixes #4319)

* fix test

* fmt
5 months ago
Nutomic abe8b18ea8
Also send reports to user's home instance (fixes #4286) (#4305) 5 months ago
Sander Saarend 35db0dc8e7
Reduce initial federation retry delay (#4346) 5 months ago
Dessalines 5f603985c0
Allow reports to be resolved, even if the community is deleted / removed. (#4345)
Fixes #4344
5 months ago
Andrew Voynov f223eb94d5
Fixed `matrix_user_id` regex (#4312)
* fix(matrix_user_id): fixed regex

* test(matrix_user_id): added test with underscore
5 months ago
SleeplessOne1917 4ef00e068f
Prevent crates that shouldn't be published from being published (#4309)
* Prevent crates that shouldn't be published from being published

* Make dependent crates publishable

* Make dependent crates publishable

* fix toml formatting

* Removing publish=true

* Removing versioned deps.

---------

Co-authored-by: SleeplessOne1917 <insomnia-void@protonmail.com>
Co-authored-by: Dessalines <tyhou13@gmx.com>
5 months ago
Felix Ableitner 08b7e0f03d Version 0.19.1-rc.2 5 months ago
Nutomic a507a39336
Add missing test cleanup (#4289)
* Add missing test cleanup

* cleanup
5 months ago
Dessalines 2899ba0131
Fixing broken post_read logic. Fixes #4290 (#4297) 5 months ago
Dessalines 8583a85607 Version 0.19.1-rc.1 5 months ago
phiresky 6790b54d4d
make activity channel infallible (#4295) 5 months ago
dullbananas dcb89f52d6
Don't update comment_aggregates if updating path fails (#4281) 5 months ago
Dessalines bc32b408b5
Fixing private message reports. (#4279) 5 months ago
dullbananas a7ba5c9dd3
Sort by post id in post view (#4270)
* Sort by post id in post view

* Remove tie_breaker

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
6 months ago
Nutomic 7a182c982b
Debug random test failure (#4275) 6 months ago
Dessalines 719b76a6e7
Create comment in transaction. Fixes #3741 (#4265)
* Create comment in transaction. Fixes #3741

* Removing if let on comment create.
6 months ago
Dessalines 246e38a45b
Making login case-insensitive. Fixes #4272 (#4273)
* Making login case-insensitive. Fixes #4272

* Removing redundant lowercase.
6 months ago
Nutomic 4a55d4f871
Quick fix for Peertube federation (fixes #4261) (#4264)
* Quick fix for Peertube federation (fixes #4261)

* prettier

* apub assets should be included in slow check paths
6 months ago
phiresky 7353be5b68
federate-less-noisy (#4263) 6 months ago
dullbananas 32afc32bc0
Correctly combine sorts in post view cursor-based pagination (#4247)
* Update post_view.rs

* Update post_view.rs

* Update Cargo.toml

* Update post_view.rs

* fix

* Update post_view.rs

---------

Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
6 months ago
dullbananas 5e589004a5
Add test for fixed deleted post filter (#4256)
* Add test for fixed deleted post filter

* fmt

* Fmt

* Update post_view.rs
6 months ago
dullbananas a0ef56b9b7
Remove moderator_view field from PostQuery (#4255) 6 months ago
Dessalines 93d123b46e
Fixing metadata endpoint. (#4257) 6 months ago
dullbananas 3e2393993e
Update mod.rs (#4240)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
6 months ago
SleeplessOne1917 8d52c7e7c7
See if different SQL query fixes performance regression (#4246)
* See if different SQL query fixes performance regression

* Fix formatting

* Hopefully fix failing federation test

* Hopefully solve federation test problem

* Use already-existing coalesce function

* Update person_view.rs

---------

Co-authored-by: SleeplessOne1917 <insomnia-void@protonmail.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: Dessalines <tyhou13@gmx.com>
6 months ago
Nutomic 30d58865b8
Speed up GET /api/v3/site endpoint (#4245)
* Make db queries for GET /api/v3/site in parallel (ref #4244)

* Cache site response

* machete

* Use try_join_with_pool macro

* machete

* taplo

* ttl 1s
6 months ago
Nutomic c7ee53026f
Upgrade dependencies (#4248)
* Upgrade dependencies

* clippy
6 months ago
Dessalines f764996745
Show federated posts on user profile. Fixes #4228 (#4229)
* Show federated posts on user profile. Fixes #4228

* Make sure posts are hidden if no listing_type is given.
6 months ago
Nutomic e317947b75
Dont allow blocking local instance (fixes #4241) (#4242)
* Dont allow blocking local instance (fixes #4241)

* use localuserview
6 months ago
Kroese 2d4037ba61
Extend sitemap span (#4231)
* Extend sitemap span

* Keep cargo_fmt happy

* Add FETCH_LIMIT_SITEMAP

* Use FETCH_LIMIT_SITEMAP

* Keep cargo_fmt happy

* Update utils.rs

* Use SITEMAP_DAYS

* Keep cargo_fmt happy

* Sitemap

* Keep cargo_fmt happy

* Sitemap

* Sitemap

* Increase to 31 days
6 months ago
Dessalines c85e680aba Version 0.19.0-rc.13 6 months ago
Nutomic a790a24c4d
Revert debug auth (#4232)
* Revert "Some changes to help debug auth problems on lemmy.ml (#4220)"

This reverts commit 16ac893e15.

* Rename auth cookie back to jwt
6 months ago
Nutomic de85e51fac
Dont set duplicate context for activities (#4233) 6 months ago
Nutomic 16ac893e15
Some changes to help debug auth problems on lemmy.ml (#4220)
* Some changes to help debug auth problems on lemmy.ml

* fix

* clippy
6 months ago
Nutomic 809fc05cb3
Only allow distinguishing own comments (fixes #4216) (#4222) 6 months ago
Dessalines 70003407a7 Version 0.19.0-rc.11 6 months ago
Dessalines 170b3ec45f
Removing cookie secure check. (#4213) 6 months ago
Dessalines 7ef6476520 Version 0.19.0-rc.10 6 months ago
Dessalines e84f8f55a2
Remove httpOnly requirement. (#4212) 6 months ago
Dessalines 86990d5138
Registrations and Reports should sort by New when viewing unresolved / unread. (#4207)
- Fixes #4206
6 months ago
Dessalines a986db1a00
Fixing rust-analyzer suggestions on rss feeds. (#4210)
* Fixing rust-analyzer suggestions on rss feeds.

* Get rid of other pointless builders.

* More cleanup.
6 months ago
Bhoomtawath Plinsut 6fa3b59d25
Fix:#4197: validate post title must be shorter than 200 letters (#4198)
* validate post title must be shorter than 200 letters

* use range contains
6 months ago
dullbananas d95df3a46f
Update diesel-async (#4203)
* Update diesel-async

* Fix
6 months ago
Nutomic 7d489f1e3f
Upgrade pictrs to 0.5.0-beta.2 (#4194)
* Upgrade pictrs to 0.5.0-beta.2

* Update src/main.rs

Co-authored-by: asonix <asonix@asonix.dog>

* add comment

---------

Co-authored-by: asonix <asonix@asonix.dog>
6 months ago
Dessalines 2b5a31b411
Upgrading deps. (#4196)
* Upgrading deps.

* Try to use native node-fetch function.

* Fixing image upload tests.
6 months ago
Dessalines d795c54a7a Version 0.19.0-rc.7 6 months ago
Dessalines 6e4278b1c9
Setting rank column defaults to a small number. Fixes #4178 (#4191)
* Setting rank column defaults to a small number. Fixes #4178

* Fixing tests.
6 months ago
Nutomic 26297b4035
Users can view their own posts after removal (fixes #4186) (#4192) 6 months ago
Dessalines 58258414cc Version 0.19.0-rc.6 6 months ago
Nutomic e58a167d64
Fix remote community posts appearing in local listing (fixes #4180) (#4181)
* Fix remote community posts appearing in local listing (fixes #4180)

* fmt

* fix typo
6 months ago
Nutomic 375e232217
Prevent purged user getting refetched from home instance (fixes #3815) (#4189) 6 months ago
Dessalines 3e1f7f2efa
Adding `creator_is_admin` to `PersonView`, `CommentView`, and `PostView`. (#4165)
* Adding creator_is_admin to PersonView, CommentView, and PostView.

* Removing left joins from comment_view.

* Removing joins from person_mention and comment_reply views.

* Removing extra left join from person_view.

* Reverting some changes in post_view.

* Fixing compile error.
6 months ago
Dessalines 28d779a960
Fixing issue with mods not being able to view reports. Fixes #4172 (#4174)
* Fixing issue with mods not being able to view reports. Fixes #4172

* Addressing PR comments.
6 months ago
Nutomic 7ba1d98915
Prevent random test failure (#4184) 6 months ago
Nutomic 49377c195e
Fix deleted posts so they can only be seen by creator (#4182) 6 months ago
dullbananas 30f7135f32
Use rust 1.74.0 in CI and move clippy lints to Cargo.toml (#4170)
* ci rust 1.74.0

* do it

* Update .woodpecker.yml

* Update Cargo.toml

* Update lint.sh

* Update lib.rs

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
6 months ago
Nutomic 62357f4444
Fix banning of remote user (fixes #4169) (#4171) 6 months ago
Dessalines 82b30b5467
Adding Selectable and diesel postgres backend check. (#4175) 6 months ago
cetra3 1c03a86c17
Upgrade activitypub to `0.5.0-beta.5` (#4179)
* Remove anyhow test

* Update lock

* Fix lints hopefully!
6 months ago
Nutomic f786df151f
Include instance blocks in settings export (#4173) 6 months ago
Nutomic 25450ea090
Fix following local communities stuck on pending (fixes #4160) (#4161)
* Fix following local communities stuck on pending (fixes #4160)

* fmt

* remove import

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
7 months ago
İsmail Karslı 2070381e81
Add upload_timeout to PictrsConfig (#4159)
* Add upload timeout to PictrsConfig

* Bad space 🤔

* Update PictrsConfig upload timeout to include units.
7 months ago
Dessalines 7cb20200d8 Version 0.19.0-rc.5 7 months ago
Nutomic fc56d0aa05
Use result instead of unwrap in apub tests (#4168) 7 months ago
SleeplessOne1917 e573010202
Fix report count endpoint error (#4167) 7 months ago
Nutomic a00313e680
Merge `/site_inbox` into `/inbox`, remove unique constraint for inboxes (#4138)
* Merge /site_inbox into /inbox (fixes #4137)

Get rid of different inboxes, only use /inbox

Remove shared_inbox_url db columns

add code migration

move to db migration, fixes

machete

fix sql

drop inbox url unique constraints

Dont create auth cookie in backend (#4136)

dont change individual inboxes to shared inbox

Dont send comment reply to user who has community blocked. Fixes #3684 (#4096)

* Dont send comment reply to user who has community blocked. Fixes #3684

* Adding source instance block check.

* Adding api test.

* Addressing PR comments.

* move site inbox rewrite to db

* fix test

* clippy

* clippy 2

* fix test
7 months ago
Dessalines e2bf2ce530
Removing show_new_post_notifs. (#4158) 7 months ago
Dessalines 28c30cc502
Adding skip_serializing_none to federation state. (#4152) 7 months ago
Nutomic 1d23df37d8
Rename cache_remote_images setting to cache_external_link_previews (ref #4035) (#4148) 7 months ago
dullbananas 8e2cbc9a0f
Remove id column and use different primary key on some tables (#4093)
* post_saved

* fmt

* remove unique and not null

* put person_id first in primary key and remove index

* use post_saved.find

* change captcha_answer

* remove removal of not null

* comment_aggregates

* comment_like

* comment_saved

* aggregates

* remove "\"

* deduplicate site_aggregates

* person_post_aggregates

* community_moderator

* community_block

* community_person_ban

* custom_emoji_keyword

* federation allow/block list

* federation_queue_state

* instance_block

* local_site_rate_limit, local_user_language, login_token

* person_ban, person_block, person_follower, post_like, post_read, received_activity

* community_follower, community_language, site_language

* fmt

* image_upload

* remove unused newtypes

* remove more indexes

* use .find

* merge

* fix site_aggregates_site function

* fmt

* Primary keys dess (#17)

* Also order reports by oldest first (ref #4123) (#4129)

* Support signed fetch for federation (fixes #868) (#4125)

* Support signed fetch for federation (fixes #868)

* taplo

* add federation queue state to get_federated_instances api (#4104)

* add federation queue state to get_federated_instances api

* feature gate

* move retry sleep function

* move stuff around

* Add UI setting for collapsing bot comments. Fixes #3838 (#4098)

* Add UI setting for collapsing bot comments. Fixes #3838

* Fixing clippy check.

* Only keep sent and received activities for 7 days (fixes #4113, fixes #4110) (#4131)

* Only check auth secure on release mode. (#4127)

* Only check auth secure on release mode.

* Fixing wrong js-client.

* Adding is_debug_mode var.

* Fixing the desktop image on the README. (#4135)

* Delete dupes and add possibly missing unique constraint on person_aggregates.

* Fixing clippy lints.

---------

Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>

* fmt

* Update community_block.rs

* Update instance_block.rs

* Update person_block.rs

* Update person_block.rs

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
7 months ago
SleeplessOne1917 1dc6c60760
Make import and export settings endpoints reachable (#4143)
* Make import and export settings endpoints reachable

* Preserve original routes
7 months ago
Dessalines e00b0c9da2
Dont send comment reply to user who has community blocked. Fixes #3684 (#4096)
* Dont send comment reply to user who has community blocked. Fixes #3684

* Adding source instance block check.

* Adding api test.

* Addressing PR comments.
7 months ago
Nutomic aaaf17486d
Dont create auth cookie in backend (#4136) 7 months ago
Dessalines 98ed0e51cc
Only check auth secure on release mode. (#4127)
* Only check auth secure on release mode.

* Fixing wrong js-client.

* Adding is_debug_mode var.
7 months ago
Dessalines 97a4fb9a72
Add UI setting for collapsing bot comments. Fixes #3838 (#4098)
* Add UI setting for collapsing bot comments. Fixes #3838

* Fixing clippy check.
7 months ago
phiresky b9b65c9c18
add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api

* feature gate

* move retry sleep function

* move stuff around
7 months ago
Nutomic 8c85f35b19
Support signed fetch for federation (fixes #868) (#4125)
* Support signed fetch for federation (fixes #868)

* taplo
7 months ago
Nutomic cf788334aa
Also order reports by oldest first (ref #4123) (#4129) 7 months ago
Dessalines adef3479c0 Version 0.19.0-rc.4 7 months ago
Dessalines eeec56c22d
Adding creator_is_moderator to CommentReplyView and PersonMentionView. (#4126) 7 months ago
Nutomic 1e59e7ab47
Show oldest registration applications first (ref #4122) (#4123)
* Show oldest registration applications first (ref #4122)

* fix tests
7 months ago
Nutomic df53d2a0e8
Change logout endpoint to return SuccessResponse (#4121) 7 months ago
Nutomic 9007d49324
Remove unused deps (#4111)
* Remove unused deps

* Adding cargo-machete to woodpecker.

---------

Co-authored-by: Dessalines <tyhou13@gmx.com>
7 months ago
Nutomic 08739e2925
Move usage of env::var to lemmy_utils, simplify db init (ref #4095) (#4108) 7 months ago
Dessalines 1b751a8cac
Adding cors_origin to settings. Fixes #3665 (#4095)
* Adding cors_origin to settings. Fixes #3665

* Fix result to option.

* Forgot to update config defaults.

* Setting a cors origin doku default.

* Adding comments for CORS.
7 months ago
Dessalines 64b00ee850
Dont allow bots to vote. Fixes #3940 (#4100)
* Dont allow bots to vote. Fixes #3940

* Removing pointless function.
7 months ago
Nutomic 568233b062
Resolve federated objects from other instances via redirect (fixes #3129) (#4073)
* Resolve federated objects from other instances via redirect (fixes #3129)

* restore domain check using library change

* add test case, update apub lib

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
7 months ago
Nutomic 45bed71c36
Include prometheus in default build, remove build feature (fixes #3558) (#4071)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
7 months ago
Dessalines 766ca99fd5
Hide private messages from blocked users. (#4102)
- Also fixes the unread count calls for CommentReply and PrivateMessage.
- Fixes #3629
7 months ago
Dessalines bd9739b5b7
Upgrading deps. (#4103) 7 months ago
Dessalines 0b41ddca58
Fix issue with sending private messages to yourself. Fixes #3912 (#4099)
* Fix issue with sending private messages to yourself. Fixes #3912

* Fix clippy.
7 months ago
Dessalines c0aee244e7
Hide public rss items for private instance. Fixes #3785 (#4097) 7 months ago
Dessalines 221365bc9a
Fix bug when leaving admin team, setting accepted application as true… (#4090)
* Fix bug when leaving admin team, setting accepted application as true. Fixes #3422

* Addressing PR comments.
7 months ago
Dessalines 2df21b9d83
Dont serialize karma. #3393 (#4089) 7 months ago
Nutomic d55bd2f2bc
Allow Arabic and Cyrillic usernames/community names (fixes #1764) (#4083)
* Allow Arabic and Cyrillic usernames/community names (fixes #1764)

* update comment
7 months ago
HackerNCoder 722d9efc13
Use starts_with for forbidden unicode (Fix #3888) (#4079)
* Use starts_with for forbidden unicode (Fix #3888)

* Require 3 visible chars in display name

* Run cargo fmt and scripts/lint

* Undo invisibly_starts_with_at

* Remove 3 min chars.count() check for display name
7 months ago
Dessalines 09a67472e7
Allow torrent magnet links as post urls. Fixes #3916 (#4092) 7 months ago
Dessalines 053dcf8c10
Fixing matrix id regex. Fixes #3431 (#4091) 7 months ago
Dessalines 5d48ee3dc8
Add creator_is_moderator to Comment and PostViews. Fixes #3347 (#4087)
* Add creator_is_moderator to Comment and PostViews. Fixes #3347

* Fixing community_moderator join.

* Addressing PR comments.
7 months ago
Dessalines 5540257b36
Fixing problem with SaveUserSettings, when either the Person or Local… (#4077)
* Fixing problem with SaveUserSettings, when either the Person or LocalUser update is null.

- Fixes #4076
- Also upgrading api_test deps

* Move function into test.
7 months ago
Dessalines 1596aee724
Adding /version route. Fixes #2914 (#4059)
* Adding /version route. Fixes #2914

* Using a simple version string.

* Use nginx rewriting to solve version.

* Forgot to remove version.

* Using an actix redirect.
7 months ago
Dessalines 5bfa4e9358
Make sure my_vote is consistently missing if not voted. Fixes #3197 (#4075)
* Make sure my_vote is consistently missing if not voted. Fixes #3197

* Fix clippy.

* Fix tests.
7 months ago
Nutomic 6235ff45b5
Return status 401 on logout with invalid auth (fixes #4081) (#4082)
* Return status 401 on logout with invalid auth (fixes #4081)

* format
7 months ago
Nutomic ec0a707110
Avoid using proxy for pictrs requests (fixes #3489) (#4072)
* Avoid using proxy for pictrs requests (fixes #3489)

* fmt
7 months ago
Nutomic dfc74835b1
Hide deleted user accounts, add tests for PersonView (fixes #3811) (#4070)
* Hide deleted user accounts, add tests for PersonView (fixes #3811)

* clippy
7 months ago
Dessalines 6bcb12b14f Version 0.19.0-rc.3 7 months ago
Dessalines 236c7e24fd
Making mark post read fields optional. (#4055)
* Making mark post read fields optional.

* Remove unecessary &

* Fix clippy.

* Addressing PR comments.

* serde(default)

* Revert "serde(default)"

This reverts commit d56afd3075.

---------

Co-authored-by: Felix Ableitner <me@nutomic.com>
7 months ago
Dessalines cae25486e4
Adding ts-rs directives for login_token. (#4063)
* Adding ts-rs directives for login_token.

* Fixing ts-rs derive.
7 months ago
Dessalines c1db65c6e5
Fix up convert more responses to SuccessResponse (#4066)
* Revert "Convert more responses to SuccessResponse. Fixes #2860 (#4058)"

This reverts commit 8deb4e5752.

* Removing purgeitem and deletecustomemoji response.

* Adding back in utils building.
7 months ago
Dessalines 8deb4e5752
Convert more responses to SuccessResponse. Fixes #2860 (#4058)
* Convert more responses to SuccessResponse. Fixes #2860

* Upgrading lemmy-js-client.
7 months ago
Nutomic 9ef28eb53b
Remove unused static (#4061) 7 months ago
dullbananas a14657d124
Refactor rate limiter and improve rate limit bucket cleanup (#3937)
* Update rate_limiter.rs

* Update mod.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update mod.rs

* Update scheduled_tasks.rs

* Shrink `RateLimitBucket`

* Update rate_limiter.rs

* Update mod.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update mod.rs

* Update rate_limiter.rs

* fmt

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* Update rate_limiter.rs

* rerun ci

* Update rate_limiter.rs

* Undo changes to  fields

* Manually undo changes to RateLimitBucket fields

* fmt

* Bucket cleanup loop in rate_limit/mod.rs

* Remove rate limit bucket cleanup from scheduled_tasks.rs

* Remove ;

* Remove UNINITIALIZED_TOKEN_AMOUNT

* Update rate_limiter.rs

* fmt

* Update rate_limiter.rs

* fmt

* Update rate_limiter.rs

* fmt

* Update rate_limiter.rs

* stuff

* MapLevel trait

* fix merge

* Prevent negative numbers in buckets

* Clean up MapLevel::check

* MapLevel::remove_full_buckets

* stuff

* Use remove_full_buckets to avoid allocations

* stuff

* remove tx

* Remove RateLimitConfig

* Rename settings_updated_channel to rate_limit_cell

* Remove global rate limit cell

* impl Default for RateLimitCell

* bucket_configs doc comment to explain EnumMap

* improve test_rate_limiter

* rename default to with_test_config

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
7 months ago
Nutomic 6d27bfed08
Handle invalid ban expires values (fixes #4045) (#4046)
* Handle invalid ban expires values (fixes #4045)

* Adding a few missing expire time checks. Fixing up time conversions. (#4051)

* Adding a few missing expire time checks. Fixing up time conversions.

* Increase settings export wait time.

* get rid of RemoveCommunity.expires

* fmt

* tests

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
8 months ago
Nutomic d827af725a
List distinguished comments first (fixes #3843) (#4050)
* List distinguished comments first (fixes #3843)

* then_order_by

* Fixing assert.

* move line

* then

---------

Co-authored-by: Dessalines <tyhou13@gmx.com>
8 months ago
Nutomic 3a19af5215
Allow marking multiple posts as read in single api call (fixes #3963) (#4048)
* Allow marking multiple posts as read in single api call (fixes #3963)

* cleanup

* limit array length

* fix test

* review

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
8 months ago
Nutomic 3f62135083
Add validate_auth api endpoint (fixes #3702) (#4049)
* Add validate_auth api endpoint (fixes #3702)

* clippy

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
8 months ago
SleeplessOne1917 cf1c32d2ab
Enable animated avatars setting (#4040)
* feat: Add user setting for toggling avatar gif animations

* Add forgotten post listing mode option to settings form

* Fix compilation error

* Fix formatting

* Change name of column to be more general purpose

* Fix sql format.

* Fix comments

* Running format.

---------

Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
8 months ago
Nutomic 56322c75f0
Read community follower count from home instance (fixes #1440) (#4013)
* Read community follower count from home instance (fixes #1440)

* fmt

* prettier

* fix tests

* fmt

* rename fn

* fmt

* Run prettier

* increase timeout

* ci

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Dessalines <tyhou13@gmx.com>
8 months ago
Nutomic 332e698336
Cleanup public api (#4047)
* Convert PersonSortType to purely internal

* Remove hot rank and other db optimizations from public api
8 months ago
Nutomic 6cfbb8fc3b
Remove empty API responses (#3993)
* Remove empty API responses

* also remove change password response

* fix invalidate

* Run clippy.

* Fixing api_test lints.

---------

Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
8 months ago
Nutomic 256ee61908
Ignore activities in remote communities without local followers (#4006)
* Ignore activities in remote communities without local followers (fixes #3568)

* x

* comments

* prettier

* fix api test

* fix test

* cleanup

* fix remaining test

* clippy

* decrease delay
8 months ago
Dessalines 3be56ef2e0
Trying to fix export ci, try 1. (#4038) 8 months ago
Nutomic 9e099726e6
Cleanup checks for community actions (fixes #2858, fixes #2868) (#4028)
* Cleanup checks for community actions (fixes #2858, fixes #2868)

* allow restoring deleted community

* review changes

* remove unneeded sql

* remove joins

* change mod log check
8 months ago
Nutomic 608bb6b1b4
Convert titles for posts from Mastodon to plaintext (fixes #3828) (#4033)
* Convert titles for posts from Mastodon to plaintext (fixes #3828)

* Fix prettier.

* Trigger build

* Convert titles for posts from Mastodon to plaintext (fixes #3828)

* Fix prettier.

* Fix sanizize.

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Dessalines <tyhou13@gmx.com>
8 months ago
Maxime Poulin 3a1be8c041
Fix legacy pagination for Subscribed feed (#4030)
This is the fix suggested in #4019

I've manually tested both legacy pagination (`page=2&limit=20`) as well as the new pagination (`cursor_next=XXXXXXX&limit=20`) using the same endpoint as #4019, and both methods appear to work as expected.
8 months ago
Nutomic 291ff19718
Only sanitize strings when generating RSS feeds and emails (fixes #4003) (#4024)
* Only sanitize strings when generating RSS feeds and emails (fixes #4003)

* clippy

* fix test
8 months ago
Nutomic 6d7b38f4de
Implement user data import/export (#3976)
* Implement endpoints for user data import/export

* add test

* exclude avatar/banner

* increase import url count, add rate limit

* also export/import saved posts

* rate limit

* rename

* saved posts also exist

* rename routes

* fix test

* error handling

* clippy

* limit parallelism

* clippy

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
8 months ago
Nutomic 6d1a7c8ae0
Wipe bio when user is banned with remove content (fixes #4012) (#4032) 8 months ago
Hamzah Mansour 6470ea81a7
add keyboard navigation setting (#3569)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Dessalines <tyhou13@gmx.com>
8 months ago
Nutomic dc327652a5
Add db table for login tokens which allows for invalidation (#3818)
* wip

* stuff

* fmt

* fmt 2

* fmt 3

* fix default feature

* use Authorization header

* store ip and user agent for each login

* add list_logins endpoint

* serde(skip) for token

* fix api tests

* A few suggestions for login_token (#3991)

* A few suggestions.

* Fixing SQL format.

* review

* review

* rename cookie

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
8 months ago
Nutomic b7d570cf35
Make input length checks consistent with HTML maxlength attribute (#4009)
* Make input length checks consistent with HTML maxlength attr (fixes #3688)

* ci

* Extricating min and max length checks (#4018)

* revert string change

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
8 months ago
Dessalines a5b8583aab Version 0.19.0-beta.7 8 months ago
Nutomic 0115613f90
Specify password length limits in error (fixes #3284) (#4007)
* Specify password length limits in error (fixes #3284)

* convert to comment
8 months ago
Nutomic 6950dd90e5
Return HTTP status 503 to all requests during startup (fixes #3780) (#4005)
* Return HTTP status 503 to all requests during startup (fixes #3780)

* add message

* fmt

* remove err

* dont run startup server if http disabled

* ci
8 months ago
Nutomic 626c7ebc85
Handle empty reason for registration application denial (fixes #3485) (#4008)
* Handle empty reason for registration application denial (fixes #3485)

* clippy

* clippy
8 months ago
Nutomic 50b7322ff3
Mention max length for site name in config (fixes #3006) (#4010)
* Mention max length for site name in config (fixes #3006)

* ci
8 months ago
Nutomic d45a2a6441
Increase timeout for image upload to 30s (fixes #3920) (#3998) 8 months ago
Nutomic 210c470ebd
Notify admin about registration application after email verification (fixes #3024) (#3995) 8 months ago
Nutomic 9bb99bec5e
Increase default database connections (fixes #3394) (#3994) 8 months ago
Dessalines 9275041f42 Version 0.19.0-rc.1 8 months ago
Nutomic 50589115e0
Fix federation of admin actions (fixes #3980) (#3988)
* Fix federation of admin actions (fixes #3980)

* clippy

---------

Co-authored-by: Dessalines <tyhou13@gmx.com>
8 months ago
SleeplessOne1917 bee6b7a1bb Update translations 8 months ago
SleeplessOne1917 13b20b0502 Address PR feedback 8 months ago
SleeplessOne1917 ed8dae99f1 Merge branch 'main' into bearer-token 8 months ago
SleeplessOne1917 37655f0f18 chore: Run rust format 8 months ago
SleeplessOne1917 519e800b33 feat: Replace ad hoc auth header with internet standard bearer token
auth header
8 months ago
Dessalines b16661a17d
Merge branch 'main' into comment-fix 8 months ago
phiresky 5941dc2924 Merge remote-tracking branch 'origin/main' into add_federation_worker_index 8 months ago
phiresky 2c283d90ca Revert "Revert "re-remove debug comments""
This reverts commit 6d519ef376.
8 months ago
phiresky dec25f9ee8 ensure overlap 8 months ago
phiresky 6d519ef376 Revert "re-remove debug comments"
This reverts commit ae37ca0137.
8 months ago
Nutomic f858d8cbce
Remove explicit auth params (#3946)
* Remove explicit auth params (ref #3725)

Only take auth via header or cookie. This requires a new version
of lemmy-js-client for api tests to pass.

* rework api_crud

* remove remaining auth params, move logic to session middleware

* fmt, fix test

* update js client

* remove auth param from api tests

* Pass auth as header

* add !

* url vars, setHeader

* cleanup

* fmt

* update

* Updating for new lemmy-js-client.

---------

Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
8 months ago
SleeplessOne1917 bb552d7659
Merge branch 'main' into comment-fix 8 months ago
phiresky 2dbaf67b7c
Merge branch 'main' into add_federation_worker_index 8 months ago
phiresky ae37ca0137 re-remove debug comments 8 months ago
phiresky a808d3208a use max(id) instead of seq max value to prevent uncommitted transactions from causing skipped activities 8 months ago
Nutomic 22608ae983
Rework the way 2FA is enabled/disabled (fixes #3309) (#3959)
* Rework the way 2FA is enabled/disabled (fixes #3309)

* postgres format

* change algo to sha1 for better compat

* review comments

* review

* clippy

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
8 months ago
phiresky 3d649e1d3e remove synchronous federation flag 8 months ago
phiresky 1a0c866b51 logging temporary 8 months ago
Dessalines 77b2d236b9
Forgot to add ts export to pagination cursor. (#3971) 8 months ago
phiresky a59a94492d more debug log 8 months ago
phiresky 78a8a7b8b7 clippy 8 months ago
phiresky 2e7d2d1956 wait for post api test function, better announce activity id 8 months ago
Nutomic 50f81cf157
User can block instances (fixes #2397) (#3869)
* User can block instances (fixes #2397)

* update comments

* review comments

* use route

* update

* add api test

* update tests

* fix

* fix test

* ci

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
8 months ago
Dessalines 89b7c981f5
Fixing GetPostsResponse serialization. (#3967) 8 months ago
SleeplessOne1917 671676d7e4 Remove unused import 8 months ago
SleeplessOne1917 c471692949
Merge branch 'main' into comment-fix 8 months ago
SleeplessOne1917 be961075c7 Do not filter removed and deleted comments on the backend 8 months ago
Dessalines c25734e4ca
Merge branch 'main' into add_federation_worker_index 8 months ago
Dessalines 8c419103b2 Fixing formatting. 8 months ago
Dessalines 4f85adc393
Merge branch 'main' into add_federation_worker_index 8 months ago
SleeplessOne1917 f93d08a147 Make moderators be able to see removed comments in communities they moderate 8 months ago
Apple Sheeple c05458adcd Sanitize registration application answer
Signed-off-by: Apple Sheeple <AppleSheeple@github>
8 months ago
Apple Sheeple 5fff7504e5 Reject registration application if sanitizing the username modifies it
This removes the possibility of using a mix of sanitized and
 non-sanitized values for `username` in code.

Signed-off-by: Apple Sheeple <AppleSheeple@github>
8 months ago
phiresky 9e886fba4a delay shorter 8 months ago