Dull Bananas
58d2434296
Merge remote-tracking branch 'upstream/main' into optimize-get-random
2024-12-20 17:39:14 -07:00
Dessalines
6015ef045d
Running cargo-features-manager prune. ( #5274 )
...
- Context #5273
2024-12-20 23:20:16 +01:00
Dessalines
9d3a0cef56
Adding report_combined
table. ( #5231 )
...
* Combined tables try 2
* Finishing up combined report table.
* Fix ts optionals.
* Adding tests, triggers, and history updates for report_combined.
* Adding profile.
* Add cursor pagination to report_combined view (#5244 )
* add pagination cursor
* store timestamp instead of id in cursor (partial)
* Revert "store timestamp instead of id in cursor (partial)"
This reverts commit 89359dde4b
.
* use paginated query builder
* Fixing migration and paged API.
* Using dullbananas trigger procedure
* Removing pointless list routes, reorganizing tests.
* Fixing column XOR check.
* Forgot to remove list report actions.
* Cleanup.
* Use internal tagging.
* Fixing api tests.
* Adding a few indexes.
* Fixing migration name.
* Fixing unique constraints.
* Addressing PR comments.
* Fixing api tests.
* Update crates/db_views/src/report_combined_view.rs
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Update crates/db_views/src/report_combined_view.rs
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Update crates/db_views/src/report_combined_view.rs
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Update migrations/2024-12-02-181601_add_report_combined_table/up.sql
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Update migrations/2024-12-02-181601_add_report_combined_table/up.sql
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Fixing import and fmt.
* Fixing null types in postgres.
* Comment out err.
* Addressing PR comments.
* Removing serialization
---------
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2024-12-19 17:22:31 -05:00
Dull Bananas
856de24520
Merge remote-tracking branch 'upstream/main' into optimize-get-random
2024-12-19 13:45:45 -07:00
Integral
8b78ddeb68
refactor: avoid using format! when String creation is unnecessary ( #5268 )
2024-12-19 15:42:01 -05:00
Dull Bananas
cd1b202612
make random_smallint function work in postgresql 16
2024-12-19 13:30:05 -07:00
Dull Bananas
fbbf088932
change migration date
2024-12-18 16:35:29 -07:00
Dull Bananas
9bedf28bdf
Merge remote-tracking branch 'upstream/main' into optimize-get-random
2024-12-18 15:04:14 -07:00
phiresky
a2a5cb091a
Community post tags (part 1) ( #4997 )
...
* partial post tags implementation
* fixes
* fix lints
* schema fix
* chore: restructure / rename tag tables
* chore: fix post view tests
* format
* lint
* expect used
* chore: update code to maybe final version
* add ts-rs optionals
* remove error context
* clippy
2024-12-18 14:54:35 +01:00
Dull Bananas
77aea3362e
only call random_smallint once for filter
2024-12-17 17:19:21 -07:00
Dull Bananas
bd020ebb0f
get_random_community_id: add filters for nsfw and private, use algorithm that doesn't scan the entire table
2024-12-17 16:25:45 -07:00
d346890b1f
Increase metadata fetch limit to 1 MB ( fixes #5208 ) ( #5266 )
2024-12-17 10:01:53 -05:00
8d91543a13
Allow admins to view deleted users ( fixes #5249 ) ( #5258 )
...
* Allow admins to view deleted users (fixes #5249 )
* remove check
2024-12-12 10:06:38 -05:00
6a9f924d20
More test coverage for user deletion ( #5259 )
2024-12-12 10:03:55 -05:00
2467a0af12
Consider remote instance as dead if it returns any status 4xx or 5xx ( #5256 )
...
* Consider remote instance as dead if it returns any status 4xx or 5xx (ref #3134 )
* remove dbg
2024-12-12 09:38:16 -05:00
8a5daeec97
Only accept database connection by uri ( #5254 )
...
* Only accept database connection by uri
* lint
* fix docker configs
2024-12-10 10:15:54 -05:00
Integral
9e17c517fe
refactor: replace static with const for global constants ( #5250 )
2024-12-09 10:31:07 +01:00
5e7b30ac6a
Reorganize api endpoints ( fixes #2022 ) ( #5216 )
...
* Reorganize api endpoints (fixes #2022 )
* scopes
* move message rate limit
* move rate limit
* apply suggestions
* move my_user to separate endpoint
* remove taglines and custom emojis from siteview
* routes for api v3 and v4
* remove new features from api v3
* js client
* replace occurences of `v3`, fix routes
* replace getSite().my_user with getMyUser()
* update
* update config
* remove web::
* update
* prettier
* lockfile
* v
* fix settings
* move block endpoints
* more changes
* fmt
* update
* change some routes
* lockfile
* Add comment about deprecation
2024-12-07 14:06:33 -07:00
adadb45ace
Add comment about upgrading Rust version ( #5248 )
2024-12-04 08:30:42 -05:00
flamingos-cant
ff2bbf41ca
Use magic number to detemine file type ( #5225 )
...
* Revert "Guess image mime type from file extension (fixes #5196 ) (#5212 )"
This reverts commit 63ea99d38a
.
* Use magic numbers to determine file type.
* fmt
* Don't wrap response in an option
* Regen Cargo.lock
* Clean-up + guess mime type from extension if server is unresponsive
* Move some things about.
* Some cleanup.
* Removing comment lines.
---------
Co-authored-by: Dessalines <tyhou13@gmx.com>
2024-12-04 08:29:50 -05:00
Dessalines
f4cd569a98
Updating to rasky's lemmy-cross-toolchain v0.5.0 for rust 1.81 ( #5247 )
...
- Fixes #5159
2024-12-04 10:22:43 +01:00
f065215e74
Add test cases for community with non-ascii name (ref #5239 ) ( #5246 )
...
* Add test cases for community with non-ascii name (ref #5239 )
* fmt
* Update run-federation-test.sh
2024-12-03 12:19:01 -05:00
dcf1cfca9b
Return content of removed comments for admins (ref #5232 ) ( #5245 )
...
* Return content of removed comments for admins (ref #5232 )
* fmt
* remove dbg
2024-12-02 17:06:39 -05:00
Mikoto
9505d1d205
feat: add PKCE ( #5189 )
...
Co-authored-by: Nutomic <me@nutomic.com>
2024-12-02 16:47:03 -05:00
ba3e6b482b
Add note wrapper ( fixes #2657 ) ( #5221 ) ( #5236 )
...
* 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
* wip
* make it work
* fmt
* now really working
* fixes
* add comments
2024-12-02 05:28:23 -05:00
renovate[bot]
5085d1c3e3
Update Rust crate diesel-async to v0.5.2 ( #5243 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-30 20:14:07 -05:00
renovate[bot]
44f584b414
Update Rust crate diesel to v2.2.5 ( #5242 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-30 19:57:32 -05: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
5a403bc250
Revert " Add note wrapper ( fixes #2657 ) ( #5221 )"
...
This reverts commit 7304ef3261
.
2024-11-28 11:14:04 +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
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