Commit graph

5098 commits

Author SHA1 Message Date
7b423a0c81 update 2024-11-29 12:50:57 +01:00
e620e94c19 fmt 2024-11-29 12:29:21 +01:00
9c6ecbf2ae more changes 2024-11-29 12:28:01 +01:00
0fa23d7b40 move block endpoints 2024-11-29 12:19:55 +01:00
f6037afa00 fix settings 2024-11-29 11:49:57 +01:00
425709251d Merge branch 'main' into reorganize-api-endpoints 2024-11-29 11:27:47 +01:00
d14f8dc1e1 v 2024-11-29 11:12:04 +01:00
Dessalines
e3fccb3f81
Fixing woodpecker secrets warning. (#5237) 2024-11-29 10:35:03 +01:00
3d7fbde091
Allow bypassing image proxy for specific domains (#5223)
* Allow bypassing proxy for some domains with ProxyAllImages

* remove web::

* remove expect

* bypass imgur by default

* correct imgur domain

* restore processing, cleanup

---------

Co-authored-by: sunaurus <sander@saarend.com>
2024-11-28 18:23:18 -05:00
66a63df152
Instance blocks with mod log entry and expiration (fixes #2506) (#5214)
* Instance blocks with mod log entry and expiration (fixes #2506)

* separate table for instance block mod log

* fix tests

* fix ts

* modlog entry for allow instance

* fix test cleanup

* add back test

* clippy

* fix check

* more changes

* move files

* update

* sql fmt

* partly working

* fix setup

* cleanup

* fixes

* prettier

* try catch

* address comments
2024-11-28 18:21:43 -05:00
f6de3b0388
Enable site languages for new user (fixes #5234) (#5235)
* Enable site languages for new user (fixes #5234)

* test coverage
2024-11-28 18:03:14 -05:00
3cec5e9f3d lockfile 2024-11-28 16:31:53 +01:00
e907f1184d prettier 2024-11-28 16:09:20 +01:00
026d58387c update 2024-11-28 16:07:27 +01:00
8ac9e2b2d4 remove web:: 2024-11-28 15:58:26 +01:00
a7942e53a0 update config 2024-11-28 15:49:15 +01:00
6eaa569d13 update 2024-11-28 12:17:48 +01:00
0583505320 replace getSite().my_user with getMyUser() 2024-11-28 12:12:04 +01:00
1dc544107a replace occurences of v3, fix routes 2024-11-28 11:43:25 +01:00
c2ccff0b12 Merge branch 'main' into reorganize-api-endpoints 2024-11-28 11:31:51 +01:00
5a403bc250 Revert " Add note wrapper (fixes #2657) (#5221)"
This reverts commit 7304ef3261.
2024-11-28 11:14:04 +01:00
d2a39ccffa js client 2024-11-26 15:49:13 +01:00
b7fdc41417 remove new features from api v3 2024-11-26 15:25:05 +01:00
a6fd2136ee routes for api v3 and v4 2024-11-26 14:51:07 +01:00
0889d38e18 Merge branch 'main' into reorganize-api-endpoints 2024-11-26 13:08:41 +01:00
7304ef3261
Add note wrapper (fixes #2657) (#5221)
* Add note wrapper (fixes #2657)

* fix activity list

* fmt

* add comment

* fix api tests

* backwards compat

* remove comment

* no todo, deprecated
2024-11-26 10:37:19 +01:00
Dessalines
7ee7b069af
Move up clippy and cargo test in CI. (#5229)
- Clippy is usually the most likely CI test to fail, and it currently
  takes > 5m to reach it, wasting CPU resources.
2024-11-26 09:39:14 +01:00
c0d7d76570
Remove getrandom dependency (#5226)
* Remove getrandom dependency

* fix
2024-11-25 18:20:45 -05:00
bb26a701bc
Proxy pictrs healthz endpoint (#5224) 2024-11-25 11:43:34 -05:00
Dessalines
ba3d574d92
Add report_counts to post and comment aggregate tables. (#5219)
* Add report_counts to post and comment aggregate tables.

- This adds a report_count and unresolved_report_count to
  the post and comment aggregate tables.
- Useful for front-ends wishing to show report links.
- Fixes #4163

* Updating the historical counts.

* Switching from bigint to smallint.

* Using dullbananas create_trigger function.
2024-11-25 11:24:57 +01:00
Dessalines
41bd830389
Fixing a few clippy recommendations on 1.84 nightly. (#5222) 2024-11-25 10:06:39 +01:00
b8dda06f5b
More test coverage for private community, fix some bugs (#5207)
* More test coverage for private community, fix some bugs

* fmt

* stuff

* attempted fix

* fix tests

* api tests passing

* fix tests

* apub lib
2024-11-22 10:49:56 -05:00
2848c076af
Add helper method for caching function results (#5220)
* Add helper method for caching function results

* fmt
2024-11-22 09:33:35 -05:00
b365d7f961 remove taglines and custom emojis from siteview 2024-11-22 09:56:27 +01:00
88b0aba101 move my_user to separate endpoint 2024-11-22 09:55:34 +01:00
0c580887d7 apply suggestions 2024-11-21 14:53:31 +01:00
b59e19de1b move rate limit 2024-11-21 14:47:31 +01:00
12ef9a0771 move message rate limit 2024-11-21 12:21:20 +01:00
48e817bacc scopes 2024-11-21 12:09:37 +01:00
9072bb365c Reorganize api endpoints (fixes #2022) 2024-11-20 14:47:48 +01:00
63ea99d38a
Guess image mime type from file extension (fixes #5196) (#5212)
* Guess image mime type from file extension (fixes #5196)

* Mime check fixes. (#5213)

* Mime check fixes.

* Adding back comment.

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2024-11-19 09:48:44 -05:00
Dessalines
417e18e819
Upgrading diesel and a few other deps. (#5203)
* Upgrading diesel and a few other deps.

* Update crates/db_schema/src/utils.rs

Co-authored-by: dullbananas <dull.bananas0@gmail.com>

---------

Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2024-11-18 10:23:02 -07:00
556358f53e
Dont sanitize RSS content manually (fixes #5171) (#5174) 2024-11-18 09:58:31 -05:00
797aac7281
Check for error when fetching link metadata (fixes #5127) (#5129)
* Check for error when fetching link metadata (fixes #5127)

* use error_for_status everywhere

* dont ignore errors

* enable lint

* fixes

* review

* more review
2024-11-15 09:13:43 -05:00
Dessalines
fa4825b524
Removing a few expects from production and test code. (#5193)
* Removing a few expects from production and test code.

- Fixes #5192

* Using if let filter for admin emails.

* Fixing unused error.

* Adding expect_used = deny to clippy lints.

* Update src/lib.rs

Co-authored-by: Nutomic <me@nutomic.com>

* Update crates/utils/src/settings/structs.rs

Co-authored-by: Nutomic <me@nutomic.com>

* Update crates/utils/src/settings/mod.rs

Co-authored-by: Nutomic <me@nutomic.com>

* Some more cleanup.

* Fix clippy

---------

Co-authored-by: Nutomic <me@nutomic.com>
2024-11-15 08:18:52 -05:00
Dessalines
231cce9350
Cleanup post action forms (#5197)
* Removing a few SuccessResponses for PostHide and MarkPostAsRead.

- This also removes the pointless multiple post_ids. These can be done
  as individual calls on the front end anyway.
- Fixes #4755

* Fixing federation tests.

* Upgrading lemmy-js-client deps.

* Add ability to mark several posts as read.

Context:

- https://github.com/LemmyNet/lemmy/pull/5043
- https://github.com/LemmyNet/lemmy/issues/4755
- https://github.com/LemmyNet/lemmy/pull/5160

* Simplifying forms.

* Fixing forms.

* Cleanup post action forms by using derive_new defaults.

- Fixes #5195

* Fix ntfy to notify on success builds also.

* Removing pointless naive_now function.

* Running taplo fmt.
2024-11-15 11:21:08 +01:00
Dessalines
7f4e26e29e
Add ability to mark multiple posts as read. (#5178)
* Removing a few SuccessResponses for PostHide and MarkPostAsRead.

- This also removes the pointless multiple post_ids. These can be done
  as individual calls on the front end anyway.
- Fixes #4755

* Fixing federation tests.

* Upgrading lemmy-js-client deps.

* Add ability to mark several posts as read.

Context:

- https://github.com/LemmyNet/lemmy/pull/5043
- https://github.com/LemmyNet/lemmy/issues/4755
- https://github.com/LemmyNet/lemmy/pull/5160

* Fix ntfy to notify on success builds also.

* Addressing PR comments.
2024-11-14 09:03:39 -05:00
Dessalines
a9d6d4e6e0
Add user setting to auto-mark fetched posts as read. (#5160)
* Add user setting to auto-mark fetched posts as read.

- Rather than apps collecting up viewed posts ids, and sending many
  mark as read requests, users can now turn this setting on, and any
  results from /post/list will be auto-marked as read.
- Fixes #5144

* Adding list_post request option to auto-mark as read.

* Moving db_perf to before federation tests.

* Fixing lemmyerrortype import.

* Fixing ts_option.

* Fix clippy.

* Fix override logic.

* Revert "Fix override logic."

This reverts commit 923d7f0eca.

* Changing name to mark_as_read
2024-11-13 10:05:16 -05:00
Dessalines
c4d864878f
Change "mark post as read", "hide post" api calls to take single post instead of multiple (#5043)
* Removing a few SuccessResponses for PostHide and MarkPostAsRead.

- This also removes the pointless multiple post_ids. These can be done
  as individual calls on the front end anyway.
- Fixes #4755

* Fixing federation tests.

* Upgrading lemmy-js-client deps.

* Simplifying forms.

* Fixing forms.

* Removing indexing slicing from a test.
2024-11-13 09:36:18 -05:00
Dessalines
faf62de4e3
Fixing cors origin wildcard. (#5194)
* Fixing cors origin wildcard.

- Fixes #5185

* Add other allows to specified origin block.

* Fix clippy.
2024-11-13 09:45:17 +01:00