Commit graph

4296 commits

Author SHA1 Message Date
Dessalines 29a3abcb02 Adding ModeratorView to listing_type_enums 2023-08-29 14:45:02 -04:00
Dessalines 2af1c1ed2f
Merge branch 'main' into main 2023-08-29 14:20:50 -04:00
Nutomic 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
biosfood 4357f3d852
Merge branch 'main' into main 2023-08-28 12:27:39 +02:00
Nutomic 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
biosfood 38b1fd61db
Merge branch 'main' into main 2023-08-26 08:50:13 +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
Nutomic 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
biosfood 94722023ff
Merge branch 'main' into main 2023-08-22 17:52:08 +02: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
Dessalines a39d609b2f
Merge branch 'main' into main 2023-08-22 10:50:58 -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
Alex Roman ab828b81e4
fix: add client connect timeout to scheduled task (#3883) 2023-08-21 10:53:35 +02:00
biosfood ff6394b6b0
Merge branch 'main' into main 2023-08-17 09:46:17 +02: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
biosfood d965599818
Merge branch 'main' into main 2023-08-11 15:12:06 +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
Nutomic 5a9de0bfdc
Merge branch 'main' into main 2023-08-11 10:59:28 +02:00
Maarten Vercruysse 9b710a2ed3
Update .woodpecker.yml use steps instead (#3858) 2023-08-10 08:15:30 -04:00
biosfood e33fc9ea96
Merge branch 'main' into main 2023-08-10 12:09:45 +02:00
Dessalines 654bc513ea
Fixing woodpecker env var. (#3854) 2023-08-09 11:14:09 +02:00
Dessalines 29869b132c
Adding 0.18.4 Release notes. (#3853) 2023-08-09 11:08:32 +02:00
Nutomic 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
Nutomic ae438e148e
Speedup CI (#3852)
* Speedup CI

* run tests in parallel

* restore cp

* main push

* no self update

* parallel format
2023-08-08 10:35:03 -04:00
Nutomic 33b2d67be6
Reorder woodpecker config to avoid ci failures (#3851) 2023-08-08 13:09:27 +02: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
biosfood cac5e2a7c9
Merge branch 'main' into main 2023-08-08 10:09:22 +02:00
Felix Ableitner 91c024fd98 Revert "Version 0.18.4-rc.2"
This reverts commit 48466b6826.
2023-08-07 17:12:09 +02:00
Felix Ableitner 48466b6826 Version 0.18.4-rc.2 2023-08-07 17:09:10 +02:00
biosfood 26463d1ca3
Merge branch 'main' into main 2023-08-07 14:32:08 +02:00
maxime.io d81fb987aa
Fix sanitize_html whitespaces (#3829) 2023-08-07 14:22:52 +02:00
biosfood 7381d03c49 fix previous merge 2023-08-07 14:10:51 +02:00
biosfood c7635d384a
Merge branch 'main' into main 2023-08-07 14:05:13 +02:00
Felix Ableitner bed9474cf0 Revert "Attempt to fix CI building wrong commits (#3830)"
This reverts commit 5e9930bdcc.
2023-08-07 13:19:07 +02:00
dullbananas 5e9930bdcc
Attempt to fix CI building wrong commits (#3830)
* Attempt to fix CI building wrong commits

* Update .woodpecker.yml

* Update .woodpecker.yml
2023-08-07 06:40:50 -04: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
biosfood 9e8391a50f fix formatting 2023-08-06 15:57:03 +02:00
biosfood 76dfece3ab fix cargo tests failing 2023-08-06 15:52:48 +02:00
biosfood 7d396d54d5 don't filter out blocked users and communities when using moderator view 2023-08-06 11:01:14 +02:00
biosfood b4fd55650d retry tests 2023-08-05 21:44:46 +02:00
biosfood 23b5fdd111 fix api test formatting 2023-08-05 21:32:32 +02:00
biosfood 2f00e90021 add api test for moderator view when listing comments 2023-08-05 21:27:26 +02:00
biosfood 420136ac6d add support for moderator view to list comments 2023-08-05 17:32:05 +02:00
biosfood b551ead183 fix formatting 2023-08-05 12:00:14 +02:00
biosfood 987942a27e 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
2023-08-05 11:53:56 +02:00
biosfood 68b0d62d5a
Merge branch 'LemmyNet:main' into main 2023-08-04 17:39:45 +02:00