Commit graph

370 commits

Author SHA1 Message Date
Dessalines
87b577467b
Adding ability to hide posts. ()
* 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 

* 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 () 2024-02-29 09:12:45 -05:00
328a48c9f5
Remove error-type feature from lemmy-utils ()
* 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
SleeplessOne1917
f42420809b
Expose LemmyErrorType in lemmy_api_common ()
* 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
Dessalines
a3bf2f1cf1
Auto resolve reports on removing a comment or post. Fixes ()
* Automatically resolve report when post/comment is removed ()

* 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
dadf8f28f9
Send purges to federated instances (fixes ) ()
* Send purges to federated instances (fixes )

* clippy

* review

* remove unused function

* clippy
2024-01-25 09:24:09 -05:00
e8a52d3a5c
Rewrite images to use local proxy ()
* Add markdown rule to add rel=nofollow for all links

* Add markdown image rule to add local image proxy (fixes )

* 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 )

* include url content type when sending post over apub (fixes )

* 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 ()

* 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. () 2024-01-25 10:24:07 +01:00
SleeplessOne1917
4b4b99aa78
Allow community mods to see votes in addition to admins ()
* 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
3d6f7ff911
Revert "Dont ignore errors during login (fixes ) ()" ()
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 ()
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2024-01-19 10:41:05 -05:00
ALEX11BR
a5289dd4cf
Use pretty_assertions for assertions ()
* 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. ()
- Allows admins to view likes, sorted by downvotes first,
  for a given comment or post.
- Fixes 
2024-01-03 13:39:21 -05:00
4163e0465e
Dont ignore errors during login (fixes ) ()
* Dont ignore errors during login (fixes )

* fix test

* fmt
2024-01-03 10:34:03 -05:00
Dessalines
5f603985c0
Allow reports to be resolved, even if the community is deleted / removed. ()
Fixes 
2024-01-03 10:31:03 +01:00
SleeplessOne1917
4ef00e068f
Prevent crates that shouldn't be published from being published ()
* 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
Dessalines
bc32b408b5
Fixing private message reports. () 2023-12-18 10:25:05 +01:00
Dessalines
93d123b46e
Fixing metadata endpoint. () 2023-12-13 10:50:51 +01:00
e317947b75
Dont allow blocking local instance (fixes ) ()
* Dont allow blocking local instance (fixes )

* use localuserview
2023-12-11 14:35:53 -05:00
Kroese
2d4037ba61
Extend sitemap span ()
* 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
a790a24c4d
Revert debug auth ()
* Revert "Some changes to help debug auth problems on lemmy.ml ()"

This reverts commit 16ac893e15.

* Rename auth cookie back to jwt
2023-12-05 11:22:08 -05:00
16ac893e15
Some changes to help debug auth problems on lemmy.ml ()
* 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 ) () 2023-12-01 09:16:22 -05:00
Dessalines
170b3ec45f
Removing cookie secure check. () 2023-11-30 04:44:18 -05:00
Dessalines
e84f8f55a2
Remove httpOnly requirement. () 2023-11-29 09:58:35 -05:00
375e232217
Prevent purged user getting refetched from home instance (fixes ) () 2023-11-22 09:36:20 -05:00
Dessalines
28d779a960
Fixing issue with mods not being able to view reports. Fixes ()
* Fixing issue with mods not being able to view reports. Fixes 

* Addressing PR comments.
2023-11-21 16:33:49 +01:00
dullbananas
30f7135f32
Use rust 1.74.0 in CI and move clippy lints to Cargo.toml ()
* 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 ) () 2023-11-21 08:44:55 -05:00
25450ea090
Fix following local communities stuck on pending (fixes ) ()
* Fix following local communities stuck on pending (fixes )

* fmt

* remove import

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-11-17 04:55:26 -05:00
SleeplessOne1917
e573010202
Fix report count endpoint error () 2023-11-16 08:50:15 -05:00
aaaf17486d
Dont create auth cookie in backend () 2023-11-08 07:55:09 -05:00
Dessalines
98ed0e51cc
Only check auth secure on release mode. ()
* 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 ()
* Add UI setting for collapsing bot comments. Fixes 

* Fixing clippy check.
2023-11-06 16:09:12 -05:00
df53d2a0e8
Change logout endpoint to return SuccessResponse () 2023-10-31 08:41:52 -04:00
9007d49324
Remove unused deps ()
* Remove unused deps

* Adding cargo-machete to woodpecker.

---------

Co-authored-by: Dessalines <tyhou13@gmx.com>
2023-10-31 11:11:12 +01:00
Dessalines
64b00ee850
Dont allow bots to vote. Fixes ()
* Dont allow bots to vote. Fixes 

* Removing pointless function.
2023-10-25 10:14:12 -04:00
Dessalines
bd9739b5b7
Upgrading deps. () 2023-10-25 05:32:21 -04:00
Dessalines
221365bc9a
Fix bug when leaving admin team, setting accepted application as true… ()
* Fix bug when leaving admin team, setting accepted application as true. Fixes 

* Addressing PR comments.
2023-10-24 17:30:47 -04:00
Dessalines
5540257b36
Fixing problem with SaveUserSettings, when either the Person or Local… ()
* Fixing problem with SaveUserSettings, when either the Person or LocalUser update is null.

- Fixes 
- Also upgrading api_test deps

* Move function into test.
2023-10-24 11:20:23 +02:00
Dessalines
236c7e24fd
Making mark post read fields optional. ()
* Making mark post read fields optional.

* Remove unecessary &

* Fix clippy.

* Addressing PR comments.

* serde(default)

* Revert "serde(default)"

This reverts commit d56afd3075a3baccb2b0eda1cc739406b83963aa.

---------

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. ()
* 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 ()
* Revert "Convert more responses to SuccessResponse. Fixes  ()"

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 ()
* Convert more responses to SuccessResponse. Fixes 

* Upgrading lemmy-js-client.
2023-10-19 13:21:05 -04:00
6d27bfed08
Handle invalid ban expires values (fixes ) ()
* Handle invalid ban expires values (fixes )

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

* 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
3a19af5215
Allow marking multiple posts as read in single api call (fixes ) ()
* Allow marking multiple posts as read in single api call (fixes )

* 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 ) ()
* Add validate_auth api endpoint (fixes )

* clippy

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-10-17 11:25:48 -04:00
SleeplessOne1917
cf1c32d2ab
Enable animated avatars setting ()
* 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
6cfbb8fc3b
Remove empty API responses ()
* 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
9e099726e6
Cleanup checks for community actions (fixes , fixes ) ()
* Cleanup checks for community actions (fixes , fixes )

* allow restoring deleted community

* review changes

* remove unneeded sql

* remove joins

* change mod log check
2023-10-13 09:48:18 -04:00