66a8823068
Merge remote-tracking branch 'origin/main' into search_combined
2025-01-16 14:17:21 -05:00
dullbananas
4120c2fc2f
Changes to get_random_community_id: add filters for nsfw and private, use algorthm that doesn't scan the entire table ( #5267 )
...
* get_random_community_id: add filters for nsfw and private, use algorithm that doesn't scan the entire table
* only call random_smallint once for filter
* change migration date
* make random_smallint function work in postgresql 16
* replace "32768 + 32767 + 1" with "65536" and improve comments
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2025-01-16 14:16:57 -05:00
flamingos-cant
099328a5b1
Add media filter setting ( #5325 )
...
* Add hide_media filter
* Test media is returned when hide_media is false
* Add GIN index
* SQL fmt
* Drop GIN index in migration
2025-01-16 12:57:58 +01:00
60e31b6dbb
Merge branch 'combined_inbox' into search_combined
2025-01-15 15:00:29 -05:00
Dessalines
3f06317878
Adding combined inbox ( #5257 )
...
* Renaming person_mention to person_comment_mention.
* Finishing up post body mentions.
* 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.
* Start working on profile combined
* Adding views and replaceable schema.
* A few changes to profile view.
- Separating the profile fetch from its combined content fetch.
- Starting to separate saved_only into its own combined view.
* Finishing up combined person_saved and person_content.
* Fixing api tests.
* Moving to api-v4 routes.
* Fixing imports.
* 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.
* Fixing TS issues.
* Adding types, fixing allow and blocklist crud.
* Starting to work on combined views.
* Using dullbananas trigger procedure
* Adding the full combined view queries.
* Adding tests.
* taplo fmt.
* Upgrading package.json deps.
* Updating pnpm
* Most of the bulk work done, need to add tests yet.
* Finishing up inbox.
* Using assert_length
* Fixing sql_format.
* Running fmt.
* Fixing cargo shear.
* Fixing clippy.
* Addressing PR comments.
* Removing serialization
* Removing serialization
* Fixing duped trigger.
* Remove saved_only test.
* Remove pointless post_tags types.
* Remove pointless index.
* Changing published to saved for person_saved_combined.
* Removing comment.
* Renaming modlog when_ columns to published.
- Fixes #5312
* Adding strum and simplifying imports.
* Avoiding clone in map_to_enum
* Changing modded_person to other_person.
* Update crates/db_views_moderator/src/modlog_combined_view.rs
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Update crates/db_views_moderator/src/modlog_combined_view.rs
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Update crates/db_views_moderator/src/modlog_combined_view.rs
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Addressing PR comments.
* Fixing split.
* Revert "Adding strum and simplifying imports."
This reverts commit 15f1671107
.
* Running fmt.
* Using assert + matches instead of filter_map.
* Adding listPersonContent check.
* Updating lemmy-js-client
* Fixing mark all as read route, changing mark read to SuccessResponse.
* Adding post body mention api test, fixing api tests.
* Fixing route locations, and api tests.
---------
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2025-01-15 12:51:39 -05:00
236d8bda3e
Merge remote-tracking branch 'origin/main' into combined_inbox
2025-01-15 11:31:14 -05:00
5bc3f0c4d9
Pictrs delete token ( #5317 )
...
* Split image endpoints into API v3 and v4
* Move into subfolders
* Upload avatar endpoint and other changes
* Various other changes
fixes #1772
fixes #4001
* clippy
* config options
* fix ts bindings
* fix api tests
* Add option to disable image upload (fixes #1118 )
* split files into upload, download
* move sitemap to top level, not in api
* simplify code
* add upload user banner
* community icon/banner
* site icon/banner
* update js client
* wip
* add delete endpoints
* change comment
* optimization
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* move fn
* 1024px banner
* dont use static client
* fix api tests
* shear
* proxy pictrs in request.rs (fixes #5270 )
* clippy
* Get rid of pictrs delete token
* remove delete token params
* try to fix api tests
* fmt
* skip api tests
* clippy
* create user
* debug
* dbg
* ignore test
* test
* image
* run another
* fixed?
* clippy
* fix
* migration with column order
* drop default
* fix health check
* update client
* remove unused
* fix
* reuse delete_image_from_pictrs
* update lib
---------
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2025-01-15 11:28:43 -05:00
8f39568760
Fixing mark all as read route, changing mark read to SuccessResponse.
2025-01-14 17:58:10 -05:00
70fcd5cdb4
Merge branch 'combined_modlog' into combined_inbox
2025-01-14 16:49:54 -05:00
Dessalines
9c1347c7a0
Adding Combined modlog ( #5253 )
...
* 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.
* Start working on profile combined
* Adding views and replaceable schema.
* A few changes to profile view.
- Separating the profile fetch from its combined content fetch.
- Starting to separate saved_only into its own combined view.
* Finishing up combined person_saved and person_content.
* Fixing api tests.
* Moving to api-v4 routes.
* Fixing imports.
* 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.
* Fixing TS issues.
* Adding types, fixing allow and blocklist crud.
* Starting to work on combined views.
* Using dullbananas trigger procedure
* Adding the full combined view queries.
* Adding tests.
* taplo fmt.
* Upgrading package.json deps.
* Updating pnpm
* Addressing PR comments.
* Removing serialization
* Removing serialization
* Fixing duped trigger.
* Remove saved_only test.
* Remove pointless post_tags types.
* Remove pointless index.
* Changing published to saved for person_saved_combined.
* Removing comment.
* Renaming modlog when_ columns to published.
- Fixes #5312
* Adding strum and simplifying imports.
* Avoiding clone in map_to_enum
* Changing modded_person to other_person.
* Update crates/db_views_moderator/src/modlog_combined_view.rs
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Update crates/db_views_moderator/src/modlog_combined_view.rs
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Update crates/db_views_moderator/src/modlog_combined_view.rs
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Addressing PR comments.
* Fixing split.
* Revert "Adding strum and simplifying imports."
This reverts commit 15f1671107
.
* Running fmt.
* Using assert + matches instead of filter_map.
* Adding listPersonContent check.
---------
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2025-01-14 15:14:58 +01:00
Dessalines
85d8810139
Merge branch 'main' into combined_modlog
2025-01-13 23:23:11 -05:00
a91a03a536
Image api rework ( #5260 )
...
* Split image endpoints into API v3 and v4
* Move into subfolders
* Upload avatar endpoint and other changes
* Various other changes
fixes #1772
fixes #4001
* clippy
* config options
* fix ts bindings
* fix api tests
* Add option to disable image upload (fixes #1118 )
* split files into upload, download
* move sitemap to top level, not in api
* simplify code
* add upload user banner
* community icon/banner
* site icon/banner
* update js client
* wip
* add delete endpoints
* change comment
* optimization
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* move fn
* 1024px banner
* dont use static client
* fix api tests
* shear
* proxy pictrs in request.rs (fixes #5270 )
* clippy
* try to fix api tests
* skip api tests
* create user
* debug
* dbg
* test
* image
* run another
* fixed?
* clippy
* fix
* fix health check
---------
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2025-01-13 16:09:00 -05:00
c3a74f9b01
Using assert + matches instead of filter_map.
2025-01-13 16:04:38 -05:00
50043afe36
Merge remote-tracking branch 'origin/main' into combined_modlog
2025-01-10 14:24:12 -05:00
11e0513592
Change default image_mode to proxy, remove deprecated option ( #5176 )
...
* Change default image_mode to proxy, remove deprecated option
* fix api test
2025-01-10 12:34:12 -05:00
11e9514c37
Running fmt.
2025-01-10 12:31:31 -05:00
0a7d88f874
Addressing PR comments.
2025-01-10 12:09:37 -05:00
0723ef2055
Changing modded_person to other_person.
2025-01-08 18:26:25 -05:00
be4a05e549
Merge remote-tracking branch 'origin/main' into combined_modlog
2025-01-08 16:58:56 -05:00
c81144cd14
Remove unused params on CreateSite/EditSite ( #5311 )
2025-01-08 16:48:29 -05:00
9df10b3dc9
Remove unused param Create/EditSite.enable_nsfw
2025-01-08 10:28:01 +01:00
03e876b1e9
Removing comment.
2025-01-05 20:37:34 -05:00
Dessalines
0bfbd74e59
Adding combined person content and person saved tables. ( #5251 )
...
* 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.
* Start working on profile combined
* Adding views and replaceable schema.
* A few changes to profile view.
- Separating the profile fetch from its combined content fetch.
- Starting to separate saved_only into its own combined view.
* Finishing up combined person_saved and person_content.
* Fixing api tests.
* Moving to api-v4 routes.
* Fixing imports.
* 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.
* Fixing TS issues.
* Using dullbananas trigger procedure
* Addressing PR comments.
* Removing serialization
* Removing serialization
* Fixing duped trigger.
* Remove saved_only test.
* Remove pointless post_tags types.
* Remove pointless index.
* Changing published to saved for person_saved_combined.
---------
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2025-01-05 12:48:57 -05:00
b46fdab768
Merge branch 'combined_profile' into combined_modlog
2025-01-03 14:45:08 -05:00
5cf0bb834a
Merge remote-tracking branch 'origin/main' into combined_profile
2025-01-03 14:33:34 -05:00
41421991d6
Error handling for thumbnail generation (ref #5196 ) ( #5298 )
2025-01-03 14:09:24 -05:00
b6d0ecfcb3
Merge branch 'combined_profile' into combined_modlog
2025-01-03 09:16:54 -05:00
leoseg
ba779b978f
New parameter read_only
for /api/v3/post/list ( #5264 )
...
* added option to get only read only posts with unittests
* formatted code
* added index on (person_id, read) on post actions where read is not null
* formatted sql
* Update migrations/2024-12-15-151642_add_index_on_person_id_read_for_read_only_post_actions/up.sql
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Fixxed error in down.sql for migration of index on (person_id,read_only,post_id) on post_actions
* Fixxed error in unittests
* Update crates/db_views/src/post_view.rs
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
---------
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2025-01-03 11:08:00 +01:00
918c5e820d
Merge remote-tracking branch 'origin/main' into combined_profile
2025-01-02 16:38:02 -05:00
Richard Schwab
f76322e3f5
Reduce false positives in URL blocklist to reduce scunthorpe problem by matching at word boundaries. ( #5282 )
...
This addresses an issue brought up on matrix where blocking rt.com resulted in links to deviantart.com getting blocked.
2024-12-27 12:53:23 -05:00
bd5210aed0
Merge remote-tracking branch 'origin/main' into combined_profile
2024-12-23 14:59:09 -05:00
Dessalines
6015ef045d
Running cargo-features-manager prune. ( #5274 )
...
- Context #5273
2024-12-20 23:20:16 +01:00
0b514c5b92
Merge branch 'combined_tables_2' into combined_profile
2024-12-19 17:44:07 -05: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
154cea9366
Merge remote-tracking branch 'origin/main' into combined_tables_2
2024-12-19 16:30:15 -05: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
d346890b1f
Increase metadata fetch limit to 1 MB ( fixes #5208 ) ( #5266 )
2024-12-17 10:01:53 -05:00
3721067cce
Moving db_views_actor and _moderator into db_views.
...
- This is necessary because the combined views use both, and that
separation was arbitrary to begin with. db_schema has no such crate
separation.
2024-12-13 11:13:21 -05:00
af543cc70b
Merge branch 'combined_tables_2' into combined_profile
2024-12-13 08:43:45 -05:00
ae9da4da69
Merge remote-tracking branch 'origin/main' into combined_tables_2
2024-12-12 19:23:20 -05:00
17d2de8691
Merge branch 'combined_modlog' into combined_inbox
2024-12-12 17:29:33 -05:00
942da64f07
Merge remote-tracking branch 'origin/main' into combined_modlog
2024-12-12 17:25:02 -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
1e6b3fbf27
Merge remote-tracking branch 'origin/main' into combined_tables_2
2024-12-12 09:39:10 -05:00
41cfdca1cf
Finishing up inbox.
2024-12-11 22:12:56 -05:00
05f218d53c
Most of the bulk work done, need to add tests yet.
2024-12-11 15:06:08 -05:00
f133079f0b
Merge branch 'post_body_mentions' into combined_inbox
2024-12-10 14:33:28 -05:00
9d36f1f176
Adding the full combined view queries.
2024-12-09 14:34:53 -05:00
5c2205ae8b
Merge remote-tracking branch 'origin/main' into combined_modlog
2024-12-09 08:25:04 -05:00
a320f5a9c5
Merge remote-tracking branch 'origin/main' into combined_profile
2024-12-09 08:15:36 -05:00