Dessalines
52155c74cb
View report history for a post or comment. Fixes #4190 ( #4492 )
2024-03-05 11:31:40 +01:00
SleeplessOne1917
36ad1868b3
Make SiteAggregates derive Copy and Hash ( #4501 )
...
Co-authored-by: SleeplessOne1917 <insomnia-void@protonmail.com>
2024-03-05 11:14:12 +01:00
Dessalines
65da4e7dbd
View mod history for a post or comment. Fixes #4162 ( #4491 )
2024-03-04 11:42:25 -05:00
3c358e5b0b
Mods and admins can comment in locked posts ( fixes #4116 ) ( #4488 )
...
* Mods and admins can comment in locked posts (fixes #4116 )
* fmt
* fix
* fix test
2024-03-04 09:15:21 -05:00
Dessalines
eb1245bceb
When using saved_only
, sort posts / comments by the saved publish time, not the item creation time ( #4479 )
...
* Work on saved selection.
* Using single value for join.
* Removing unecessary check.
* Remove saved_only pointless block.
2024-03-04 14:19:51 +01:00
Dessalines
7eec8714d7
When site banning a federated user, also remove their content from our local communities. ( #4464 )
...
* When banning a federated user, also remove their content from our local
communities.
- This works by:
- Before a site ban, find all posts and comments to local communities
- Send a federated community ban action for each local comm.
- This also removes their content in the apub receive code.
- Adding back in federated community ban api tests.
- Adding in two more api tests for site bans.
- Fixes #4118
* Add local community ban, and nonlocal person check.
* Ignoring errors.
* Move local check into function.
* Addressing PR comments 2
2024-03-01 13:45:06 -05:00
08b01a377d
Support listing type for person ( fixes #4146 ) ( #4487 )
...
* Support listing type for person (fixes #4146 )
* add test
2024-03-01 11:53:20 -05:00
c5e54a318a
Store password reset token after email successfully sent ( fixes #3757 ) ( #4489 )
2024-03-01 11:32:59 -05:00
a7fa075e8c
Make logs less verbose ( fixes #3627 ) ( #4490 )
2024-03-01 11:32:13 -05:00
c895e57086
Remove unneeded error "last successful id is higher than latest id" ( fixes #4363 ) ( #4486 )
2024-03-01 11:31:37 -05:00
Dessalines
87b577467b
Adding ability to hide posts. ( #4480 )
...
* Adding ability to hide posts.
- Adds an post/hide API route.
- Adds a `show_hidden` (default false) to `GetPosts`.
- Adds a `hidden` field to `PostView`.
- Removes the single `post_id` from MarkPostAsRead.
- Fixes #1403
* Add a check to make sure hidden field is true.
* Fixing test.
* Add back semicolon
2024-02-29 10:42:34 -05:00
6d815db375
Require verified email to reset password ( #4482 )
2024-02-29 09:12:45 -05:00
328a48c9f5
Remove error-type feature from lemmy-utils ( #4474 )
...
* Remove error-type feature from lemmy-utils
* fixes
---------
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
2024-02-27 11:13:52 -05:00
Dessalines
e01ea32928
Fix doctype check issue for metadata fetching. Fixes #4468 ( #4472 )
...
* Fix doctype check issue for metadata fetching. Fixes #4468
* Change warn to info.
2024-02-26 10:24:09 -05:00
Dessalines
f3d48f2c2c
Adding some recommended fixes from nightly clippy. ( #4473 )
2024-02-26 09:47:10 -05:00
7316dd281a
Correctly synchronize collection of community featured posts ( fixes #3867 ) ( #4475 )
2024-02-26 09:45:23 -05:00
SleeplessOne1917
f42420809b
Expose LemmyErrorType in lemmy_api_common ( #4439 )
...
* Expose LemmyErrorType in lemmy_api_common
* Make conditional compilation gates for utils
* Make it so api_common doesn't pull in unnecessary deps
* Make error type non exhaustive
* Fix formatting
* Format toml
* Add some convenience derives to LemmyError
* Simplify features
* Fix CI compile error
---------
Co-authored-by: SleeplessOne1917 <insomnia-void@protonmail.com>
2024-02-24 19:54:27 -05:00
dullbananas
f56b84615c
Move DbUrl trait impls to newtypes.rs ( #4463 )
...
* Move DbUrl trait impls to newtypes.rs
* Update utils.rs
2024-02-19 12:41:28 -05:00
dullbananas
d79502dff3
Escape backslashes in fuzzy_search ( #4462 )
...
* Escape backslashes in fuzzy_search
* Update utils.rs
2024-02-18 09:12:56 -05:00
dullbananas
ae62ef2b7e
Ignore expired bans in CommentReportView::read, just like in CommentReportQuery::list ( #4457 )
...
* Update comment_report_view.rs
* Update comment_report_view.rs
* Update comment_report_view.rs
* Update comment_report_view.rs
2024-02-18 09:12:12 -05:00
SleeplessOne1917
39345466da
Make it so the signed in user can see if they're banned from a community ( #4458 )
...
* Make it so the signed in user can see if they're banned from a community
* Use more appropriate field name
---------
Co-authored-by: SleeplessOne1917 <insomnia-void@protonmail.com>
2024-02-18 09:09:46 -05:00
Dessalines
5d551e6da5
Adding an instance-level default_sort_type ( #4454 )
...
* Adding an instance-level default_sort_type
- Fixes #3796
* Fixing comment.
* Put user sort before site sort.
2024-02-16 09:36:46 -05:00
ffcf415cac
Dont log db url on connection error ( fixes #4453 ) ( #4456 )
...
* Dont log db url on connection error (fixes #4453 )
* remove format
2024-02-16 08:50:06 -05:00
86b44c2a4d
Add site.content_warning, local_site.default_post_listing_mode ( #4393 )
...
* Include local_site.content_warning setting for showing nsfw by default
* Add community setting `only_followers_can_vote`
* clippy
* add auto_expand_images site setting
* cleanup
* add missing api params
* postquery/communityquery changes
* clippy
* change error
* replace auto_expand_images with default_site_post_listing_mode
* change post/community query params
* get rid of only_followers_can_vote
* machete
* fix
* clippy
* revert remaining vote changes
* remove dead code
* remove unused var
* fmt
2024-02-16 07:24:35 -05:00
Dessalines
a3bf2f1cf1
Auto resolve reports on removing a comment or post. Fixes #4390 ( #4402 )
...
* Automatically resolve report when post/comment is removed (#3850 )
* Automatically resolve report when post/comment is removed
* also handle apub removes
* Removing auto-resolve report triggers.
* Dont allow creating reports for deleted / removed items.
* Running pgformat.
* Fixing test.
* Addressing PR comments.
* Forgot comment report.
---------
Co-authored-by: Nutomic <me@nutomic.com>
2024-02-15 08:52:04 -05:00
Dessalines
890565ca14
Deleting denied local_users older than a week. Fixes #4434 ( #4448 )
...
* Deleting denied local_users older than a week. Fixes #4434
* Addressing PR comments.
* Upping rust to 1.76
* Delete the person rows also.
2024-02-15 07:50:53 -05:00
Dessalines
3f7cc07b02
Adding ability to specify a custom post thumbnail. ( #4425 )
...
* Adding ability to specify a custom post thumbnail.
- Context: #4204
* Fixing ts-rs serialization.
* Fixing conversion, adding checks.
* Proxying custom_thumbnail. Fixed logic for update.
* Only generate metadata thumbnail is theres no custom thumbnail.
2024-02-15 10:42:23 +01:00
Dessalines
33989f5518
Blocking an instance also hides private messages from their users. ( #4447 )
...
* Blocking an instance also hides private messages from their users.
- Fixes #4444
* Separating private message tests.
2024-02-14 10:49:55 +01:00
Lcchy
8a6a86c1bb
Add support for RSS media enclosures in feeds ( #4442 )
...
* Add support for RSS media enclosures in feeds
* Use post.url_content_type
2024-02-13 10:46:46 +01:00
dullbananas
677d54ae57
Allow better query plans ( #4424 )
...
* Update utils.rs
* Create bind_if_some.rs
* limit connection age
* Delete crates/db_schema/src/utils/bind_if_some.rs
* Update utils.rs
* Update utils.rs
* Update utils.rs
* Update utils.rs
* Update utils.rs
* Update utils.rs
* Update utils.rs
* Update utils.rs
* Update utils.rs
* Update utils.rs
* Update utils.rs
* Update utils.rs
* Update utils.rs
2024-02-12 16:44:29 +01:00
SleeplessOne1917
300869d397
Make request models derive PartialEq, Eq, and Hash ( #4443 )
...
* Make request models derive PartialEq, Eq, and Hash
* Fix clippy error
---------
Co-authored-by: SleeplessOne1917 <insomnia-void@protonmail.com>
2024-02-11 00:32:14 -05:00
Elara
3c5b1ac6dd
Use the Accept-Language header to set new users' language ( #4435 )
...
* Use the Accept-Language header to set new users' language
* Implement clippy suggestions
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2024-02-08 10:53:03 +01:00
dullbananas
f631f43024
Run analyze in db_perf ( #4420 )
2024-02-07 22:37:44 -05:00
Elara
328d48ef7e
Remove invalid XML characters from RSS feeds ( #4416 )
...
* Remove all characters that are disallowed by XML
* Combine contiguous unicode ranges into one range
2024-01-30 15:55:45 +01:00
Elara
0e9924a2b3
Add media:content
thumbnail to RSS feed ( #4413 )
...
* Add media:content thumbnail to RSS feed
* Run formatter
* Add media namespace definition
* Add comment linking to media-rss documentation
2024-01-29 08:56:35 -05:00
0f414a95d5
Local only community ( #4350 )
...
* Add support for local only community (fixes #1576 )
* add filters and tests to db views
* dont federate local only community
* test get apub community http
* tests
* more checks
* wip
* api test
* fix tests
* change community.local_only column to visibility enum
(for private communities)
* sql fmt
* rename vars
* clippy
* fix tests
* update lib
* review
* fix js client version
* update client
2024-01-25 11:04:25 -05:00
Dessalines
8cde452fca
Add a comment to clarify the ban expires field. ( #4400 )
...
* Add a comment to clarify the ban expires field.
* Add comment about simpler client implementation.
* Better language.
2024-01-25 16:45:42 +01:00
dadf8f28f9
Send purges to federated instances ( fixes #4119 ) ( #4398 )
...
* Send purges to federated instances (fixes #4119 )
* clippy
* review
* remove unused function
* clippy
2024-01-25 09:24:09 -05:00
e8a52d3a5c
Rewrite images to use local proxy ( #4035 )
...
* Add markdown rule to add rel=nofollow for all links
* Add markdown image rule to add local image proxy (fixes #1036 )
* comments
* rewrite markdown image links working
* add comment
* perform markdown image processing in api/apub receivers
* clippy
* add db table to validate proxied links
* rewrite link fields for avatar, banner etc
* sql fmt
* proxy links received over federation
* add config option
* undo post.url rewriting, move http route definition
* add tests
* proxy images through pictrs
* testing
* cleanup request.rs file
* more cleanup (fixes #2611 )
* include url content type when sending post over apub (fixes #2611 )
* store post url content type in db
* should be media_type
* get rid of cache_remote_thumbnails setting, instead automatically
take thumbnail from federation data if available.
* fix tests
* add setting disable_external_link_previews
* federate post url as image depending on mime type
* change setting again
* machete
* invert
* support custom emoji
* clippy
* update defaults
* add image proxy test, fix test
* fix test
* clippy
* revert accidental changes
* address review
* clippy
* Markdown link rule-dess (#4356 )
* Extracting opengraph_data to its own type.
* A few additions for markdown-link-rule.
---------
Co-authored-by: Nutomic <me@nutomic.com>
* fix setting
* use enum for image proxy setting
* fix test configs
* add config backwards compat
* clippy
* machete
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2024-01-25 09:22:11 -05:00
Dessalines
1782aafd10
Upgrading deps. ( #4401 )
2024-01-25 10:24:07 +01:00
dullbananas
d8f9e8a64c
Post view: move cursor pagination to separate library, add backward pagination to PostQuery ( #4320 )
...
* stuff
* stuff
* crates.io
* Update up.sql
* Rerun federation tests
* Update post_view.rs
* Update post_view.rs
* Update up.sql
* Update utils.rs
* Fix precision loss
* Update up.sql
* Update down.sql
* remove unwrap
* Update post_view.rs
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2024-01-24 10:50:11 -05:00
dullbananas
759f6d8a9a
Better query plan viewing experience ( #4285 )
...
* stuff
* stuff including batch_upsert function
* stuff
* do things
* stuff
* different timestamps
* stuff
* Revert changes to comment.rs
* Update comment.rs
* Update comment.rs
* Update post_view.rs
* Update utils.rs
* Update up.sql
* Update up.sql
* Update down.sql
* Update up.sql
* Update main.rs
* use anyhow macro
* replace get(0) with first()
* as_slice
* Update series.rs
* Update db_perf.sh
* Update and rename crates/db_schema/src/utils/series.rs to crates/db_perf/src/series.rs
* Update utils.rs
* Update main.rs
* Update main.rs
* Update .woodpecker.yml
* fmt main.rs
* Update .woodpecker.yml
* Instance::delete at end
* Update main.rs
* Update Cargo.toml
---------
Co-authored-by: Nutomic <me@nutomic.com>
2024-01-24 10:22:33 -05:00
İsmail Karslı
8670403a67
Add local_subscribers field to CommunityAggregates. Fixes #4144 ( #4166 )
...
* Add upload timeout to PictrsConfig
* Bad space 🤔
* Update PictrsConfig upload timeout to include units.
* Add local_subscribers field to CommunityAggregates
struct and schema
* sql format
* local_subscribers test
* fix local_subscribers test
* Revert "fix local_subscribers test"
This reverts commit 4bbac5ce4a
.
* Revert "local_subscribers test"
This reverts commit 735107e1f7
.
* Create trigger for local_subscribers
* Rename variable
* re-trigger ci
* re-trigger ci
* Add local_subscribers count to follow.spec.ts
* Rename local_subscribers to subscribers_local
* Add subscribers_local to community_aggregates
* added subscribers_local to the aggregate tests
* Check if person exists on community_follower trigger
* Delete community follows before deleting person
* Update lemmy-js-client in api_tests
* Refactor local_subscriber migration
* fix format
* Move migration files date to now
* Fix test to wait for aggregates to federate
* re-trigger ci
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2024-01-24 10:22:05 -05:00
Dessalines
922ec7c2cd
Forgot to add skip_serializing_none to persondetailsres. ( #4399 )
2024-01-24 09:58:58 -05:00
jim-taylor-business
f43d2eca70
make inner type pub so it can be read and created easily in other crates ( #4397 )
...
this is for use in SSR pagination in Lemmy-UI-Leptos
2024-01-24 09:03:31 -05:00
Dessalines
20fd4b5869
Clippy fixes for 1.77.0 nightly ( #4395 )
...
* A few 1.77.0-nightly clippy fixes.
* Dead code warnings.
* More fixes.
2024-01-24 10:34:09 +01:00
Dessalines
eb56d9253c
Adding site to GetPersonDetails. Fixes #4373 ( #4394 )
...
* Adding site to GetPersonDetails. Fixes #4373
* Removing the conditioned site return.
2024-01-24 10:32:14 +01:00
SleeplessOne1917
4b4b99aa78
Allow community mods to see votes in addition to admins ( #4392 )
...
* Allow community mods to see votes in addition to admins
* Use Post instead of PostView
---------
Co-authored-by: SleeplessOne1917 <insomnia-void@protonmail.com>
2024-01-23 18:47:28 -05:00
2133bcea4e
Version 0.19.3
2024-01-22 08:56:08 -05:00
0868910570
Add secondary sort by published date for post view ( fixes #4383 ) ( #4384 )
2024-01-22 08:52:21 -05:00
df11d77a0d
Updating translations.
2024-01-19 11:23:47 -05:00
3d6f7ff911
Revert "Dont ignore errors during login ( fixes #4319 ) ( #4321 )" ( #4380 )
...
This reverts commit 4163e0465e
.
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2024-01-19 11:21:43 -05:00
516db012bf
Dont allow caching captcha response ( #4381 )
...
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2024-01-19 10:41:05 -05:00
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>
2024-01-19 09:40:12 -05:00
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
2024-01-15 09:33:39 -05:00
9240a653c0
Fix bug with Mastodon undo follow activities ( #4364 )
2024-01-11 18:56:19 -05:00
143fdb62b1
Updating translations.
2024-01-10 10:16:36 -05:00
2d16d12cb7
Move publish = false
to correct place in lemmy_server ( fixes #4359 ) ( #4361 )
2024-01-10 09:07:09 -05:00
Dessalines
3b717cfc88
Removing serde_skip from newest_comment_time. Fixes #4351 ( #4360 )
2024-01-10 10:44:27 +01:00
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
2024-01-09 12:19:25 -05:00
2f09ad8e5b
Version 0.19.2-rc.4
2024-01-09 09:25:52 -05:00
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
2024-01-05 11:03:13 -05:00
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
2024-01-05 15:42:46 +01:00
d3efebfa4e
Version 0.19.2-rc.1
2024-01-05 11:33:37 +01:00
Dessalines
1856e7c0ca
Increasing max items for user settings import. ( #4352 )
...
- Fixes #4307
2024-01-05 10:43:30 +01:00
phiresky
0e6669f617
no endless loop if queue too recent ( #4349 )
2024-01-04 13:28:26 -05:00
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
2024-01-04 12:16:51 -05:00
38e64825e6
Add macro assert_length!() for tests ( #4348 )
...
* Add macro assert_length!() for tests
* fix
* number
2024-01-04 11:51:55 -05:00
3cad3b2119
Dont overwrite cache-control header in session middleware ( #4337 )
2024-01-04 11:44:36 -05:00
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
2024-01-04 11:42:18 -05:00
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>
2024-01-04 04:47:18 -05:00
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
2024-01-03 13:39:21 -05:00
phiresky
024ab7d530
Fix federate loop ( #4330 )
...
* make activity channel infallible
* clippy
* federate: make cancellabletask loop itself
2024-01-03 13:30:06 -05:00
4163e0465e
Dont ignore errors during login ( fixes #4319 ) ( #4321 )
...
* Dont ignore errors during login (fixes #4319 )
* fix test
* fmt
2024-01-03 10:34:03 -05:00
abe8b18ea8
Also send reports to user's home instance ( fixes #4286 ) ( #4305 )
2024-01-03 10:31:51 -05:00
Sander Saarend
35db0dc8e7
Reduce initial federation retry delay ( #4346 )
2024-01-03 10:31:23 +01:00
Dessalines
5f603985c0
Allow reports to be resolved, even if the community is deleted / removed. ( #4345 )
...
Fixes #4344
2024-01-03 10:31:03 +01:00
Andrew Voynov
f223eb94d5
Fixed matrix_user_id
regex ( #4312 )
...
* fix(matrix_user_id): fixed regex
* test(matrix_user_id): added test with underscore
2023-12-21 12:13:24 +01:00
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>
2023-12-20 09:11:58 -05:00
08b7e0f03d
Version 0.19.1-rc.2
2023-12-20 10:32:51 +01:00
a507a39336
Add missing test cleanup ( #4289 )
...
* Add missing test cleanup
* cleanup
2023-12-19 05:26:00 -05:00
Dessalines
2899ba0131
Fixing broken post_read logic. Fixes #4290 ( #4297 )
2023-12-19 10:46:41 +01:00
8583a85607
Version 0.19.1-rc.1
2023-12-18 14:20:42 -05:00
phiresky
6790b54d4d
make activity channel infallible ( #4295 )
2023-12-18 13:17:10 -05:00
dullbananas
dcb89f52d6
Don't update comment_aggregates if updating path fails ( #4281 )
2023-12-18 10:31:39 +01:00
Dessalines
bc32b408b5
Fixing private message reports. ( #4279 )
2023-12-18 10:25:05 +01:00
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>
2023-12-15 06:42:28 -05:00
7a182c982b
Debug random test failure ( #4275 )
2023-12-15 12:28:08 +01:00
Dessalines
719b76a6e7
Create comment in transaction. Fixes #3741 ( #4265 )
...
* Create comment in transaction. Fixes #3741
* Removing if let on comment create.
2023-12-15 11:36:58 +01:00
Dessalines
246e38a45b
Making login case-insensitive. Fixes #4272 ( #4273 )
...
* Making login case-insensitive. Fixes #4272
* Removing redundant lowercase.
2023-12-15 11:34:17 +01:00
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
2023-12-14 07:25:47 -05:00
phiresky
7353be5b68
federate-less-noisy ( #4263 )
2023-12-14 07:25:04 -05:00
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>
2023-12-14 07:10:01 -05:00
dullbananas
5e589004a5
Add test for fixed deleted post filter ( #4256 )
...
* Add test for fixed deleted post filter
* fmt
* Fmt
* Update post_view.rs
2023-12-13 11:09:10 +01:00
dullbananas
a0ef56b9b7
Remove moderator_view field from PostQuery ( #4255 )
2023-12-13 10:52:28 +01:00
Dessalines
93d123b46e
Fixing metadata endpoint. ( #4257 )
2023-12-13 10:50:51 +01:00
dullbananas
3e2393993e
Update mod.rs ( #4240 )
...
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-12-12 13:06:17 -05:00
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>
2023-12-12 12:09:52 -05:00
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
2023-12-12 11:56:39 -05:00
c7ee53026f
Upgrade dependencies ( #4248 )
...
* Upgrade dependencies
* clippy
2023-12-12 08:56:33 -05:00
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.
2023-12-11 14:36:12 -05:00
e317947b75
Dont allow blocking local instance ( fixes #4241 ) ( #4242 )
...
* Dont allow blocking local instance (fixes #4241 )
* use localuserview
2023-12-11 14:35:53 -05:00
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
2023-12-11 11:24:51 +01:00
c85e680aba
Version 0.19.0-rc.13
2023-12-06 18:20:52 -05:00
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
2023-12-05 11:22:08 -05:00
de85e51fac
Dont set duplicate context for activities ( #4233 )
2023-12-05 11:19:12 -05:00
16ac893e15
Some changes to help debug auth problems on lemmy.ml ( #4220 )
...
* Some changes to help debug auth problems on lemmy.ml
* fix
* clippy
2023-12-01 09:18:29 -05:00
809fc05cb3
Only allow distinguishing own comments ( fixes #4216 ) ( #4222 )
2023-12-01 09:16:22 -05:00
70003407a7
Version 0.19.0-rc.11
2023-11-30 05:02:18 -05:00
Dessalines
170b3ec45f
Removing cookie secure check. ( #4213 )
2023-11-30 04:44:18 -05:00
7ef6476520
Version 0.19.0-rc.10
2023-11-29 10:04:42 -05:00
Dessalines
e84f8f55a2
Remove httpOnly requirement. ( #4212 )
2023-11-29 09:58:35 -05:00
Dessalines
86990d5138
Registrations and Reports should sort by New when viewing unresolved / unread. ( #4207 )
...
- Fixes #4206
2023-11-29 11:08:23 +01:00
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.
2023-11-29 11:00:06 +01:00
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
2023-11-27 10:46:03 +01:00
dullbananas
d95df3a46f
Update diesel-async ( #4203 )
...
* Update diesel-async
* Fix
2023-11-27 10:31:19 +01:00
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>
2023-11-24 07:44:17 -05:00
Dessalines
2b5a31b411
Upgrading deps. ( #4196 )
...
* Upgrading deps.
* Try to use native node-fetch function.
* Fixing image upload tests.
2023-11-24 10:29:41 +01:00
d795c54a7a
Version 0.19.0-rc.7
2023-11-23 21:09:56 -05:00
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.
2023-11-23 20:39:46 -05:00
26297b4035
Users can view their own posts after removal ( fixes #4186 ) ( #4192 )
2023-11-23 09:47:49 -05:00
58258414cc
Version 0.19.0-rc.6
2023-11-22 09:59:04 -05:00
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
2023-11-22 09:41:52 -05:00
375e232217
Prevent purged user getting refetched from home instance ( fixes #3815 ) ( #4189 )
2023-11-22 09:36:20 -05:00
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.
2023-11-21 11:20:24 -05:00
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.
2023-11-21 16:33:49 +01:00
7ba1d98915
Prevent random test failure ( #4184 )
2023-11-21 10:08:19 -05:00
49377c195e
Fix deleted posts so they can only be seen by creator ( #4182 )
2023-11-21 08:59:47 -05:00
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>
2023-11-21 08:51:22 -05:00
62357f4444
Fix banning of remote user ( fixes #4169 ) ( #4171 )
2023-11-21 08:44:55 -05:00
Dessalines
82b30b5467
Adding Selectable and diesel postgres backend check. ( #4175 )
2023-11-21 08:42:28 -05:00
cetra3
1c03a86c17
Upgrade activitypub to 0.5.0-beta.5
( #4179 )
...
* Remove anyhow test
* Update lock
* Fix lints hopefully!
2023-11-21 10:26:12 +01:00
f786df151f
Include instance blocks in settings export ( #4173 )
2023-11-17 21:59:15 -05:00
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>
2023-11-17 04:55:26 -05:00
İsmail Karslı
2070381e81
Add upload_timeout to PictrsConfig ( #4159 )
...
* Add upload timeout to PictrsConfig
* Bad space 🤔
* Update PictrsConfig upload timeout to include units.
2023-11-17 04:01:32 -05:00
7cb20200d8
Version 0.19.0-rc.5
2023-11-16 23:30:09 -05:00
fc56d0aa05
Use result instead of unwrap in apub tests ( #4168 )
2023-11-16 22:51:33 -05:00
SleeplessOne1917
e573010202
Fix report count endpoint error ( #4167 )
2023-11-16 08:50:15 -05:00
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
2023-11-16 14:22:40 +01:00
Dessalines
e2bf2ce530
Removing show_new_post_notifs. ( #4158 )
2023-11-15 10:20:01 +01:00
Dessalines
28c30cc502
Adding skip_serializing_none to federation state. ( #4152 )
2023-11-14 08:20:44 -05:00
1d23df37d8
Rename cache_remote_images setting to cache_external_link_previews (ref #4035 ) ( #4148 )
2023-11-13 09:19:09 -05:00
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>
2023-11-13 08:14:07 -05:00
SleeplessOne1917
1dc6c60760
Make import and export settings endpoints reachable ( #4143 )
...
* Make import and export settings endpoints reachable
* Preserve original routes
2023-11-13 08:08:07 -05:00
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.
2023-11-09 12:03:25 +01:00
aaaf17486d
Dont create auth cookie in backend ( #4136 )
2023-11-08 07:55:09 -05:00
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.
2023-11-07 11:03:13 +01:00
Dessalines
97a4fb9a72
Add UI setting for collapsing bot comments. Fixes #3838 ( #4098 )
...
* Add UI setting for collapsing bot comments. Fixes #3838
* Fixing clippy check.
2023-11-06 16:09:12 -05:00
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
2023-11-06 16:07:04 -05:00
8c85f35b19
Support signed fetch for federation ( fixes #868 ) ( #4125 )
...
* Support signed fetch for federation (fixes #868 )
* taplo
2023-11-06 16:02:01 -05:00
cf788334aa
Also order reports by oldest first (ref #4123 ) ( #4129 )
2023-11-06 05:29:30 -05:00
adef3479c0
Version 0.19.0-rc.4
2023-11-03 10:02:30 -04:00
Dessalines
eeec56c22d
Adding creator_is_moderator to CommentReplyView and PersonMentionView. ( #4126 )
2023-11-03 14:41:00 +01:00
1e59e7ab47
Show oldest registration applications first (ref #4122 ) ( #4123 )
...
* Show oldest registration applications first (ref #4122 )
* fix tests
2023-11-02 07:38:46 -04:00
df53d2a0e8
Change logout endpoint to return SuccessResponse ( #4121 )
2023-10-31 08:41:52 -04:00
9007d49324
Remove unused deps ( #4111 )
...
* Remove unused deps
* Adding cargo-machete to woodpecker.
---------
Co-authored-by: Dessalines <tyhou13@gmx.com>
2023-10-31 11:11:12 +01:00
08739e2925
Move usage of env::var to lemmy_utils, simplify db init (ref #4095 ) ( #4108 )
2023-10-25 11:34:38 -04:00
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.
2023-10-25 16:46:34 +02:00
Dessalines
64b00ee850
Dont allow bots to vote. Fixes #3940 ( #4100 )
...
* Dont allow bots to vote. Fixes #3940
* Removing pointless function.
2023-10-25 10:14:12 -04:00
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>
2023-10-25 07:14:59 -04:00
45bed71c36
Include prometheus in default build, remove build feature ( fixes #3558 ) ( #4071 )
...
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-10-25 06:54:58 -04:00
Dessalines
766ca99fd5
Hide private messages from blocked users. ( #4102 )
...
- Also fixes the unread count calls for CommentReply and PrivateMessage.
- Fixes #3629
2023-10-25 12:01:40 +02:00
Dessalines
bd9739b5b7
Upgrading deps. ( #4103 )
2023-10-25 05:32:21 -04:00
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.
2023-10-25 05:09:10 -04:00
Dessalines
c0aee244e7
Hide public rss items for private instance. Fixes #3785 ( #4097 )
2023-10-25 10:41:52 +02:00
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.
2023-10-24 17:30:47 -04:00
Dessalines
2df21b9d83
Dont serialize karma. #3393 ( #4089 )
2023-10-24 17:26:09 -04:00
d55bd2f2bc
Allow Arabic and Cyrillic usernames/community names ( fixes #1764 ) ( #4083 )
...
* Allow Arabic and Cyrillic usernames/community names (fixes #1764 )
* update comment
2023-10-24 16:25:52 -04:00
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
2023-10-24 16:57:40 +02:00
Dessalines
09a67472e7
Allow torrent magnet links as post urls. Fixes #3916 ( #4092 )
2023-10-24 16:48:00 +02:00
Dessalines
053dcf8c10
Fixing matrix id regex. Fixes #3431 ( #4091 )
2023-10-24 16:47:02 +02:00
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.
2023-10-24 08:37:03 -04:00
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.
2023-10-24 11:20:23 +02:00
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.
2023-10-24 10:49:52 +02:00
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.
2023-10-23 12:40:29 -04:00
6235ff45b5
Return status 401 on logout with invalid auth ( fixes #4081 ) ( #4082 )
...
* Return status 401 on logout with invalid auth (fixes #4081 )
* format
2023-10-23 12:17:26 -04:00
ec0a707110
Avoid using proxy for pictrs requests ( fixes #3489 ) ( #4072 )
...
* Avoid using proxy for pictrs requests (fixes #3489 )
* fmt
2023-10-20 11:09:34 -04:00
dfc74835b1
Hide deleted user accounts, add tests for PersonView ( fixes #3811 ) ( #4070 )
...
* Hide deleted user accounts, add tests for PersonView (fixes #3811 )
* clippy
2023-10-20 10:01:29 -04:00
6bcb12b14f
Version 0.19.0-rc.3
2023-10-19 20:34:48 -04:00
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>
2023-10-19 20:16:23 -04:00
Dessalines
cae25486e4
Adding ts-rs directives for login_token. ( #4063 )
...
* Adding ts-rs directives for login_token.
* Fixing ts-rs derive.
2023-10-19 20:16:12 -04:00
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.
2023-10-19 20:15:55 -04:00
Dessalines
8deb4e5752
Convert more responses to SuccessResponse. Fixes #2860 ( #4058 )
...
* Convert more responses to SuccessResponse. Fixes #2860
* Upgrading lemmy-js-client.
2023-10-19 13:21:05 -04:00
9ef28eb53b
Remove unused static ( #4061 )
2023-10-19 11:57:39 -04:00
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>
2023-10-19 15:31:51 +02:00
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>
2023-10-17 13:25:35 -04:00
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>
2023-10-17 13:22:50 -04:00
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>
2023-10-17 12:35:51 -04:00
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>
2023-10-17 11:25:48 -04:00
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>
2023-10-17 10:52:34 -04:00
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>
2023-10-17 10:34:38 -04:00
332e698336
Cleanup public api ( #4047 )
...
* Convert PersonSortType to purely internal
* Remove hot rank and other db optimizations from public api
2023-10-16 19:37:28 -04:00
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>
2023-10-16 12:36:53 -04:00
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
2023-10-16 06:03:49 -04:00
Dessalines
3be56ef2e0
Trying to fix export ci, try 1. ( #4038 )
2023-10-16 12:01:59 +02:00
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
2023-10-13 09:48:18 -04:00
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>
2023-10-12 20:36:02 -04:00
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.
2023-10-11 16:53:18 +02:00
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
2023-10-11 16:48:19 +02:00
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>
2023-10-11 16:47:22 +02:00
6d1a7c8ae0
Wipe bio when user is banned with remove content ( fixes #4012 ) ( #4032 )
2023-10-10 11:11:11 -04:00
Hamzah Mansour
6470ea81a7
add keyboard navigation setting ( #3569 )
...
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Dessalines <tyhou13@gmx.com>
2023-10-10 12:17:27 +02:00
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>
2023-10-09 12:46:12 +02:00
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>
2023-10-05 16:39:07 -04:00
a5b8583aab
Version 0.19.0-beta.7
2023-10-05 16:01:12 -04:00
0115613f90
Specify password length limits in error ( fixes #3284 ) ( #4007 )
...
* Specify password length limits in error (fixes #3284 )
* convert to comment
2023-10-05 07:40:22 -04:00
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
2023-10-04 18:19:58 -04:00
626c7ebc85
Handle empty reason for registration application denial ( fixes #3485 ) ( #4008 )
...
* Handle empty reason for registration application denial (fixes #3485 )
* clippy
* clippy
2023-10-04 15:20:22 +02:00
50b7322ff3
Mention max length for site name in config ( fixes #3006 ) ( #4010 )
...
* Mention max length for site name in config (fixes #3006 )
* ci
2023-10-04 15:09:25 +02:00
d45a2a6441
Increase timeout for image upload to 30s ( fixes #3920 ) ( #3998 )
2023-09-29 11:20:14 -04:00
210c470ebd
Notify admin about registration application after email verification ( fixes #3024 ) ( #3995 )
2023-09-28 10:06:45 -04:00
9bb99bec5e
Increase default database connections ( fixes #3394 ) ( #3994 )
2023-09-28 09:56:39 -04:00
9275041f42
Version 0.19.0-rc.1
2023-09-26 23:01:19 -04:00
50589115e0
Fix federation of admin actions ( fixes #3980 ) ( #3988 )
...
* Fix federation of admin actions (fixes #3980 )
* clippy
---------
Co-authored-by: Dessalines <tyhou13@gmx.com>
2023-09-25 21:39:18 -04:00
SleeplessOne1917
bee6b7a1bb
Update translations
2023-09-25 06:38:23 -04:00
SleeplessOne1917
13b20b0502
Address PR feedback
2023-09-25 06:37:45 -04:00
SleeplessOne1917
ed8dae99f1
Merge branch 'main' into bearer-token
2023-09-24 17:47:17 -04:00
SleeplessOne1917
37655f0f18
chore: Run rust format
2023-09-22 21:39:03 -04:00
SleeplessOne1917
519e800b33
feat: Replace ad hoc auth header with internet standard bearer token
...
auth header
2023-09-22 21:26:27 -04:00
Dessalines
b16661a17d
Merge branch 'main' into comment-fix
2023-09-21 11:20:49 -04:00
phiresky
5941dc2924
Merge remote-tracking branch 'origin/main' into add_federation_worker_index
2023-09-21 11:57:13 +00:00
phiresky
2c283d90ca
Revert "Revert "re-remove debug comments""
...
This reverts commit 6d519ef376
.
2023-09-21 11:45:33 +00:00
phiresky
dec25f9ee8
ensure overlap
2023-09-21 11:11:54 +00:00
phiresky
6d519ef376
Revert "re-remove debug comments"
...
This reverts commit ae37ca0137
.
2023-09-21 11:07:36 +00:00
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>
2023-09-21 06:42:28 -04:00
SleeplessOne1917
bb552d7659
Merge branch 'main' into comment-fix
2023-09-20 17:38:47 +00:00
phiresky
2dbaf67b7c
Merge branch 'main' into add_federation_worker_index
2023-09-20 18:06:44 +02:00
phiresky
ae37ca0137
re-remove debug comments
2023-09-20 15:33:09 +00:00
phiresky
a808d3208a
use max(id) instead of seq max value to prevent uncommitted transactions from causing skipped activities
2023-09-20 14:57:18 +00:00
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>
2023-09-20 10:49:54 -04:00
phiresky
3d649e1d3e
remove synchronous federation flag
2023-09-20 14:22:17 +00:00
phiresky
1a0c866b51
logging temporary
2023-09-20 13:37:18 +00:00
Dessalines
77b2d236b9
Forgot to add ts export to pagination cursor. ( #3971 )
2023-09-20 15:28:56 +02:00
phiresky
a59a94492d
more debug log
2023-09-20 12:30:38 +00:00
phiresky
78a8a7b8b7
clippy
2023-09-20 11:41:34 +00:00
phiresky
2e7d2d1956
wait for post api test function, better announce activity id
2023-09-20 11:23:02 +00:00
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>
2023-09-20 11:56:13 +02:00
Dessalines
89b7c981f5
Fixing GetPostsResponse serialization. ( #3967 )
2023-09-20 11:49:26 +02:00
SleeplessOne1917
671676d7e4
Remove unused import
2023-09-18 19:40:01 -04:00
SleeplessOne1917
c471692949
Merge branch 'main' into comment-fix
2023-09-18 19:31:46 -04:00
SleeplessOne1917
be961075c7
Do not filter removed and deleted comments on the backend
2023-09-18 19:31:12 -04:00
Dessalines
c25734e4ca
Merge branch 'main' into add_federation_worker_index
2023-09-18 19:19:24 -04:00
8c419103b2
Fixing formatting.
2023-09-18 19:19:13 -04:00
Dessalines
4f85adc393
Merge branch 'main' into add_federation_worker_index
2023-09-18 19:16:49 -04:00
SleeplessOne1917
f93d08a147
Make moderators be able to see removed comments in communities they moderate
2023-09-18 19:09:17 -04:00
Apple Sheeple
c05458adcd
Sanitize registration application answer
...
Signed-off-by: Apple Sheeple <AppleSheeple@github>
2023-09-18 22:39:29 +03:00
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>
2023-09-18 22:39:20 +03:00
phiresky
9e886fba4a
delay shorter
2023-09-18 16:49:55 +00:00
phiresky
88931227b0
Merge remote-tracking branch 'origin/main' into add_federation_worker_index
2023-09-18 16:45:23 +00:00
phiresky
27141553b6
fix after revert
2023-09-18 14:28:49 +00:00
phiresky
08401fc85f
Revert "remove synchronous federation"
...
This reverts commit 2767ab4a6f
.
2023-09-18 14:25:35 +00:00
Apple Sheeple
b431c9bdf9
Sanitize apub post body
...
Signed-off-by: Apple Sheeple <AppleSheeple@github>
2023-09-18 16:00:29 +02:00
phiresky
544d30f0d4
Fix Posts List Performance + cursor-based pagination ( #3872 )
...
* add token-based pagination + fast subscribed post view
* add migrations
* fix failing heuristic
* revert
* output pagination token as next_page, fix off-by-one, restructure
* more cleanup
* clean
* format sql
* fix comment
* fix tests
* e
* empty
* move last page thing
* restructure a bit for readability
* rename page_cursor
* update for scaled sort
* fix
* sql format
* fix
* get rid of macros
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-09-18 15:44:48 +02:00
SleeplessOne1917
6d02a9914c
Update translation
2023-09-18 07:38:00 -04:00
SleeplessOne1917
05b1ebdc7c
Fix comments created by ser not showing up
2023-09-18 02:59:59 -04:00
SleeplessOne1917
eab1862e9a
Make deleted and removed comments show when they have childern
2023-09-17 23:38:07 -04:00
phiresky
b09ffa7197
instead of changing fed delays in debug mode, change them via env variable
2023-09-13 11:23:13 +00:00
phiresky
dca43dcfd9
fix a bug where after an hour community follows would be overwritten completely by an incremental upgrade
2023-09-13 10:54:10 +00:00
4f1240487e
Fixing high CPU usage on federation worker recheck. Fixes #3958
2023-09-12 15:54:49 -04:00
phiresky
375d9a2a3c
Persistent, performant, reliable federation queue ( #3605 )
...
* persistent activity queue
* fixes
* fixes
* make federation workers function callable from outside
* log federation instances
* dead instance detection not needed here
* taplo fmt
* split federate bin/lib
* minor fix
* better logging
* log
* create struct to hold cancellable task for readability
* use boxfuture for readability
* reset submodule
* fix
* fix lint
* swap
* remove json column, use separate array columns instead
* some review comments
* make worker a struct for readability
* minor readability
* add local filter to community follower view
* remove separate lemmy_federate entry point
* fix remaining duration
* address review comments mostly
* fix lint
* upgrade actitypub-fed to simpler interface
* fix sql format
* increase delays a bit
* fixes after merge
* remove selectable
* fix instance selectable
* add comment
* start federation based on latest id at the time
* rename federate process args
* dead instances in one query
* filter follow+report activities by local
* remove synchronous federation
remove activity sender queue
* lint
* fix federation tests by waiting for results to change
* fix fed test
* fix comment report
* wait some more
* Apply suggestions from code review
Co-authored-by: SorteKanin <sortekanin@gmail.com>
* fix most remaining tests
* wait until private messages
* fix community tests
* fix community tests
* move arg parse
* use instance_id instead of domain in federation_queue_state table
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: SorteKanin <sortekanin@gmail.com>
2023-09-09 12:25:03 -04:00
3b67642ec2
Add ts(skip) attributes to fix js client code generation ( #3952 )
...
* Add ts(skip) attributes to fix js client code generation
* use feature flag
2023-09-08 08:35:58 -04:00
Dessalines
9785b20843
Adding a scaled sort, to boost smaller communities. ( #3907 )
...
* Adding a scaled sort, to boost smaller communities.
- Previously referred to as *best* .
- Fixes #3622
* Fixing scheduled task update.
* Converting hot_rank integers to floats.
* Altering hot_rank psql function to default to zero after a week.
* Setting scaled_rank to zero, where hot_rank is zero.
* Adding image_upload table.
2023-09-06 13:43:27 -04:00
SorteKanin
4121fc4d56
Include domain in errors ( #3944 )
2023-09-06 13:29:15 -04:00
71d61138bc
Replace ammonia lib with manual html escaping ( fixes #3774 ) ( #3938 )
...
* Replace ammonia lib with manual html escaping (fixes #3774 )
* prettier
* clippy
* remove sanitize unit test
* fix tests
* fix schema
2023-09-06 10:56:26 -04:00
Anon
fe3ebea95a
Add logging for pictrs uploads ( #3927 )
...
* Add logging for pictrs uploads
* cleanup
2023-09-06 09:13:30 -04:00
Dessalines
797d26fdf4
Change AddAdmin to use person_id instead of local_user_id ( #3941 )
...
- Front ends don't have easy access to local_user_id on moddable
items like comments and posts.
2023-09-06 11:37:03 +02:00
a0ea8dbc00
Auto resolve reports trigger ( #3871 )
...
* Revert "Automatically resolve report when post/comment is removed (#3850 )"
This reverts commit f7f6766650
.
* Automatically resolve reports using db trigger
* lint
* use mod log tables
* fix migration
* fix ci
* fix clippy
2023-09-05 05:35:10 -04:00
366d9d1e2e
Get rid of remaining Perform/SendActivity traits ( fixes #3670 ) ( #3926 )
...
* Get rid of remaining Perform/SendActivity traits (fixes #3670 )
* fix api tests
* ci
2023-09-05 05:33:46 -04:00
dullbananas
a1a9c3e4c0
Make use of variables less redundant and inconsistent in distinguish.rs ( #3932 )
...
* Make use of variables less redundant and inconsistent in distinguish.rs
* fmt
2023-09-04 11:06:54 +02:00
dullbananas
5b5ac0f37d
Remove left joins and use only one call to select method in post_view.rs ( #3865 )
...
* Use same joins for read and list in post_view.rs
* fmt
* rerun ci
* rerun ci
* Update post_view.rs
* rerun ci
* rerun ci
* Update post_view.rs
* Use `exists`
* Update post_view.rs
* Update post_view.rs
* Update post_view.rs
* rerun ci
* Update post_view.rs
* person_id_join parameter
* rerun ci
* fmt
* Update post_view.rs
* rerun ci
* Update post_view.rs
* rerun ci
* fmt
* Update post_view.rs
* fmt
* Use into_sql
* Update post_view.rs
* Use inferred query source for BoxableExpression
* Update post_view.rs
* Update post_view.rs
* Update community.rs
* Update community.rs
* Update post_view.rs
* fmt
* Update community.rs
* Update community.rs
* Update community.rs
* Update community.rs
* Update community.rs
* Update post_view.rs
* Update community.rs
* fmt
* 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
* fmt
* Update post_view.rs
* Update post_view.rs
* fix
* trigger ci
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2023-09-04 11:05:00 +02:00
Nick Webster
a57658d99c
Adding a new config flag to disable pictrs caching for thumbnails ( #3897 )
...
* add logic to prevent downloading remote pictrs images
* apply formatting
* Do not attempt a pictrs fetch if the remote image is also on a pictrs instance
* Do not attempt a pictrs fetch if the remote image is also on a pictrs instance and cache_federated_images is false
* Generalising the no caching option to handle all remote images
* rustfmt
* Return None if the URL is not an image
* Updating defaults.hjson
* fixing typo
* Fixing typo
* Skip cloning the Url unless we need to
* using a HEAD request for checking the content type, saving bandwidth/improving perf
* Removing early returns
* Switching back to GET requests for Content-Type because pictrs does not handle HEAD requests
* Simplifying logic and using metadata_image instead of url if we do not get a pictrs thumbnail
* Removing unused import
* Return None as a thumbnail if caching is disabled
* formatting
---------
Co-authored-by: Djones4822 <david.jones4822@gmail.com>
2023-08-31 10:36:39 -04:00
dullbananas
15930cbf4d
Use Queryable instead of JoinView ( #3917 )
...
* Update utils.rs
* Update traits.rs
* Update comment_report_view.rs
* Update comment_view.rs
* Update local_user_view.rs
* Update post_report_view.rs
* Update post_view.rs
* Update private_message_report_view.rs
* Update private_message_view.rs
* Update registration_application_view.rs
* Update site_view.rs
* Update structs.rs
* Update comment_reply_view.rs
* Update community_block_view.rs
* Update community_follower_view.rs
* Update community_moderator_view.rs
* Update community_person_ban_view.rs
* Update community_person_ban_view.rs
* Update community_view.rs
* Update person_block_view.rs
* Update person_mention_view.rs
* Update person_view.rs
* Update structs.rs
* Update admin_purge_comment_view.rs
* Update admin_purge_community_view.rs
* Update admin_purge_person_view.rs
* Update admin_purge_post_view.rs
* Update mod_add_community_view.rs
* Update mod_add_view.rs
* Update mod_ban_from_community_view.rs
* Update mod_ban_view.rs
* Update mod_feature_post_view.rs
* Update mod_hide_community_view.rs
* Update mod_lock_post_view.rs
* Update mod_remove_comment_view.rs
* Update mod_remove_community_view.rs
* Update mod_remove_post_view.rs
* Update mod_transfer_community_view.rs
* Update structs.rs
* Update utils.rs
* Update private_message_view.rs
* Update comment_report_view.rs
* Update registration_application_view.rs
* Update utils.rs
* fix
* fix db_views
* fix
* Update comment_view.rs
2023-08-31 15:26:10 +02:00
Dessalines
56e26fc3d4
Adding a post_view mode. Fixes #3730 ( #3731 )
...
* Adding a post_view mode. Fixes #3730
* Fix test.
* Addressing PR comments.
* Adding a post_view mode. Fixes #3730
* Fix test.
* Addressing PR comments.
* Fixing column order.
* Fix default Ok returns.
* Removing return Err(... where feasible.
2023-08-31 09:01:08 -04:00
fed6542055
Implement remote follow ( #3738 )
...
* Add remote follow url to webfinger response
* update apub lib
2023-08-31 09:00:41 -04:00
biosfood
384e55f0e4
update moderator view ( #3820 )
...
* update api tests for new moderator view
* chage moderator view to be a listing type in get posts
Note: Internally, the listing type is called ListingType.ModeratorView,
but it's called "Moderator View" in the api endpoint
* fix formatting
* add support for moderator view to list comments
* add api test for moderator view when listing comments
* fix api test formatting
* retry tests
* don't filter out blocked users and communities when using moderator view
* fix cargo tests failing
* fix formatting
* fix previous merge
* Adding ModeratorView to listing_type_enums
* Fixing fmt.
* Adding a default to ListingType.
* Upgrading to use new lemmy-js-client.
---------
Co-authored-by: Nutomic <me@nutomic.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Dessalines <tyhou13@gmx.com>
2023-08-31 13:07:45 +02:00
Lukas Trombach
c93bde9799
replace expect
with ErrorUnauthorized
( #3915 )
...
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-08-29 19:08:44 -04:00
b2aee565f3
Allow passing auth via header or cookie ( #3725 )
...
* Allow passing auth via header or cookie
* revert submodule
* taplo
* fix build
* working
* convert apub api methods
* also set cache-control header
* opt
* clippy
* deduplicate code, ignore invalid auth
* clippy
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-08-29 10:47:57 -04:00
7fd14b3d2a
Make remove content optional during account deletion ( fixes #1617 ) ( #3817 )
...
* Make remove content optional during account deletion (fixes #1617 )
* simplify purge params by passing context
* update js client
* add delete content
* update woodpecker config
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-08-28 12:23:45 +02:00
Lukas Trombach
26d125cc63
Sitemap - use UTC time ( #3914 )
...
* change local filter to use `eq` function
* use Utc time for sitemap
2023-08-28 11:09:20 +02:00
phiresky
514f2222e0
Fix time zone handling ( #3496 )
...
* convert naive time to utc time
* compounding fixes
* cargo fmt
* fix the rest
* fix down migration
* fix migrations
* fix after merge
* clippy fix
* ap-fed 0.5.0
---------
Co-authored-by: Nutomic <me@nutomic.com>
2023-08-24 11:27:00 -04:00
6047257bfc
Move admin flag from person to local_user ( fixes #3060 ) ( #3403 )
...
* Move admin flag from person to local_user (fixes #3060 )
The person table is for federated data, but admin flag can only
apply to local users. Thats why it really belongs in the local_user
table. This will also prevent the federation code from accidentally
overwriting the admin flag
* fmt
* try to fix api tests
* lint
* fix person view
* ci
* ci
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-08-24 05:40:08 -04:00
Freakazoid182
51ccf318e8
Lowercase domain on db query filters ( #3849 ) ( #3873 )
...
* Lowercase domain on db query filters (#3849 )
* Add test to get a community on different cased domain (#3849 )
* Lowercase the identity for webfinger (#3849 )
* Lowercase both sides of the domain comparison (#3849 )
* Format api_tests (#3849 )
* Lowercase domain lookup on Instance and Person (#3849 )
---------
Co-authored-by: Freek van Zee <freek.van.zee@mediamonks.com>
Co-authored-by: Freakazoid182 <>
2023-08-22 11:10:21 -04:00
Lukas Trombach
28324ad2c8
Sitemap ( #3808 )
...
* generate sitemap.xml file
* set up endpoint for sitemap
* Update sitemap generation
- remove sitemap generation from scheduled tasks
- add posts query for sitemap
- create sitemap module in API crate
* remove priority and change freq from sitemap
* add configuration option for number of posts for sitemap
* fix default config
* rate limit sitemap endpoint
* update sitemap query
* update sitemap generation
- remove config value for query limit
- adjust sitemap generation to query changes
- tidy up error handling
* refactor sitemap generation loop
* remove `limit` argument
* refactor `generate_urlset` and add unit test
* change query to only fetch local posts of past 24h
* fix outdated comment and log
* cargo fmt
2023-08-22 10:30:15 -04:00
Freakazoid182
ee7b35a04a
Add person name to PersonIsBannedFromSite error ( #3786 ) ( #3855 )
...
* Add person name to PersonIsBannedFromSite error (#3786 )
* Log PersonId instead of Person name (#3850 )
* Log actor_id for PersonIsBannedFromSite (#3850 )
---------
Co-authored-by: Freek van Zee <freek.van.zee@mediamonks.com>
2023-08-16 11:36:58 +02:00
Freakazoid182
c8063f3267
Replace Option<bool> with bool for PostQuery and CommentQuery ( #3819 ) ( #3857 )
...
* Replace Option<bool> with bool for PostQuery and CommentQuery (#3819 )
* Replace Option<bool> from all list queries (#3819 )
---------
Co-authored-by: Freek van Zee <freek.van.zee@mediamonks.com>
2023-08-11 11:13:14 +02:00
f7f6766650
Automatically resolve report when post/comment is removed ( #3850 )
...
* Automatically resolve report when post/comment is removed
* also handle apub removes
2023-08-08 11:19:55 -04:00
dullbananas
969f8b2ce9
Replace TypedBuilder with Default in update forms ( #3814 )
...
* Update comment.rs
* Update community.rs
* Update local_site.rs
* Update local_site_rate_limit.rs
* Update local_user.rs
* Update person.rs
* Update comment.rs
* Update community.rs
* Update local_site.rs
* Update local_site_rate_limit.rs
* Update local_user.rs
* Update post.rs
* Update private_message.rs
* Update site.rs
* Update post.rs
* Update person.rs
* Update private_message.rs
* Update comment.rs
* Update create.rs
* Update leave_admin.rs
* Update update.rs
* Update remove.rs
* Update add_admin.rs
* Update verify_email.rs
* Update mod.rs
* Update mod.rs
* Update undo_delete.rs
* Update undo_delete.rs
* Update utils.rs
* Update feature.rs
* Update delete.rs
* Update lock.rs
* Update create.rs
* Update approve.rs
* Update update.rs
* Update lock_page.rs
* Update block_user.rs
* Update delete.rs
* Update undo_block_user.rs
* Update collection_remove.rs
* Update post.rs
* Update hide.rs
* Update person.rs
* Update remove.rs
* Update post_view.rs
* Update create.rs
* Update remove.rs
* Update collection_add.rs
* Update community.rs
* Update update.rs
* Update post_aggregates.rs
* Update update.rs
* Update comment.rs
* Update code_migrations.rs
* Update registration_application_view.rs
* Update update.rs
* Update ban_person.rs
* Update community.rs
* Update delete.rs
* Update delete.rs
* Update delete.rs
* Update person_aggregates.rs
* Update save_settings.rs
* Update distinguish.rs
* Update mark_read.rs
* Update site_aggregates.rs
* Update create.rs
* Fix
* rerun ci
* Update comment.rs
* rerun ci
* Update create.rs
* Update create.rs
* Update post_view.rs
* rerun ci
* Update undo_delete.rs
* rerun ci
2023-08-08 11:41:41 +02:00
dullbananas
a47b12bbde
Reduce amount of columns selected ( #3755 )
...
* PostAggregatesNotInPost
* CommentAggregatesNotInComment
* CommunityPersonBanAdditionalInfo (partial)
* Revert "CommunityPersonBanAdditionalInfo (partial)"
This reverts commit 158f7f0cd9
.
* Replace some nullable parts of selection with id::nullable().is_not_null()
* CommunityFollower::select_subscribed_type
* WithoutId
* Add WithoutId derives
* Update Cargo.toml
* rerun ci
* Fix syntatx errors
* rerun ci
* Add missing "|" in private_message_report_view.rs
* rerun ci
* cargo fmt
* rerun ci
* Only derive WithoutId for Community with "full" feature
* rerun ci
* Fix attribute filtering in WithoutId macro
* rerun ci
* Update without_id.rs
* rerun ci
* Update without_id.rs
* rerun ci
* Fix errors
* rerun ci
* cargo fmt
* Fix errors
* rerun ci
* Move WithoutId to lib.rs
* rerun ci
* Remove macro_use for paste
* rerun ci
* Update comment_reply_view.rs
* rerun ci
* Update registration_application_view.rs
* rerun ci
* Revert "Update registration_application_view.rs"
This reverts commit 2e98e4bb83
.
* Revert "Update comment_reply_view.rs"
This reverts commit 857bf9f5a2
.
* Revert "Remove macro_use for paste"
This reverts commit 13247279ed
.
* Revert "Move WithoutId to lib.rs"
This reverts commit 0c23e5213b
.
* Revert "Fix errors"
This reverts commit a283d155e5
.
* Revert "cargo fmt"
This reverts commit 36a5210352
.
* Revert "Fix errors"
This reverts commit c9102c14f4
.
* Revert "Update without_id.rs"
This reverts commit 19adb2fcc8
.
* Revert "Update without_id.rs"
This reverts commit e26107a2fe
.
* Revert "Fix attribute filtering in WithoutId macro"
This reverts commit acaa4902b0
.
* Revert "Only derive WithoutId for Community with "full" feature"
This reverts commit de0e9c6fdc
.
* Revert "cargo fmt"
This reverts commit 5e1bd1ce58
.
* Revert "Add missing "|" in private_message_report_view.rs"
This reverts commit c7ae9f1cd5
.
* Revert "Fix syntatx errors"
This reverts commit d942f099de
.
* Revert "Update Cargo.toml"
This reverts commit 23cdb6f6d3
.
* Revert "Add WithoutId derives"
This reverts commit 06006d6ad3
.
* Revert "WithoutId"
This reverts commit 5e86922b0f
.
* Revert "CommentAggregatesNotInComment"
This reverts commit 603aede7ce
.
* Revert "PostAggregatesNotInPost"
This reverts commit 1ee3fcaeab
.
* Restore original position of options.saved_only filter
* rerun ci
* Update post_view.rs
* rerun ci
2023-08-08 11:41:10 +02:00
Piotr Juszczyk
2ad3450004
Allow filtering posts and comments by whether they were liked/disliked - fixes #3401 ( #3523 )
...
* Allow filtering posts and comments by whether they were liked/disliked
* Switch to 2 args - liked_only, disliked_only - taking bools
* Make liked_only and disliked_only Option<bool>
* Fix unrelated is_profile_view compilation error
2023-08-08 11:40:28 +02:00
Alex Lavallee
f9c2ba1cfa
Allow filtering PMs by sender ( #3770 )
...
* Allow filtering PMs by sender
* Fix retreiving own messages when filtering pm creator id
* Add tests
* Undo rename
* Fix PM tests
* Fix formatting for PMs
* Fix PM test formatting
* Rename PM creator_id field
* Fix PM formatting
2023-08-08 11:07:41 +02:00
91c024fd98
Revert "Version 0.18.4-rc.2"
...
This reverts commit 48466b6826
.
2023-08-07 17:12:09 +02:00
48466b6826
Version 0.18.4-rc.2
2023-08-07 17:09:10 +02:00
maxime.io
d81fb987aa
Fix sanitize_html whitespaces ( #3829 )
2023-08-07 14:22:52 +02:00
Dessalines
57cb5637fc
Fix ordering when doing a comment_parent type list_comments
( #3823 )
...
* Fix ordering when doing a comment_parent type GetPost.
* Fix missing options.
2023-08-07 11:11:07 +02:00
66ac8100d9
Remove unused db view options ( #3787 )
...
* Remove unused db view options
* fix tests
* ci
2023-08-04 11:36:36 -04:00
2bb24c2859
Remove form_id params ( #3812 )
2023-08-04 09:22:43 -04:00
Dessalines
70fae9d68d
Fixing broken SQL migration formatting. ( #3800 )
...
* Fixing SQL format.
* Fixing clippy lints.
* Fixing clippy lint 2.
2023-08-03 11:07:35 +02:00
2d0f77af59
Dont use sha hash for password reset token ( fixes #3491 ) ( #3795 )
2023-08-02 13:02:53 -04:00
27be1efb74
Rewrite remaining federation actions, get rid of PerformCrud trait ( #3794 )
...
* Rewrite ban actions
* Rewrite delete/remove actions
* Rewrite remove/delete community
* Rewrite report actions
* Rewrite feature/lock post
* Rewrite update community actions
* Rewrite remaining federation actions
* Get rid of PerformCrud trait
* clippy
2023-08-02 12:52:41 -04:00
RocketDerp
b4380cb548
Do not hide read posts when it is a user profile view ( #3791 )
2023-08-02 12:31:28 -04:00