5cf0bb834a
Merge remote-tracking branch 'origin/main' into combined_profile
2025-01-03 14:33:34 -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
2244fd005d
Changing published to saved for person_saved_combined.
2025-01-02 17:08:05 -05:00
4bc4876f31
Remove pointless index.
2024-12-24 14:30:34 -05:00
bd5210aed0
Merge remote-tracking branch 'origin/main' into combined_profile
2024-12-23 14:59:09 -05:00
7585aac446
Fix startup errors, add unit test for scheduled task errors ( fixes #5209 ) ( #5269 )
...
* Fix startup errors, add ci check (fixes #5209 )
* normal unit test
* cleanup
* shear
* remove serial
* migration
2024-12-20 19:21:09 -05: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
58e62d55d9
Fixing TS issues.
2024-12-08 09:27:29 -05:00
cf2b00e0ba
Merge branch 'combined_tables_2' into combined_profile
2024-12-08 09:19:04 -05:00
2d482b3556
Fixing null types in postgres.
2024-12-08 08:56:12 -05:00
40fead2bee
Merge branch 'combined_tables_2' into combined_profile
2024-12-08 08:50:07 -05:00
Dessalines
10f5e373cf
Update migrations/2024-12-02-181601_add_report_combined_table/up.sql
...
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2024-12-08 08:45:49 -05:00
Dessalines
fa31fc37d0
Update migrations/2024-12-02-181601_add_report_combined_table/up.sql
...
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2024-12-08 08:44:37 -05:00
3abc46fad9
Finishing up combined person_saved and person_content.
2024-12-07 15:46:46 -05:00
32b5411abd
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.
2024-12-07 12:38:20 -05:00
1053df1a4b
Adding views and replaceable schema.
2024-12-06 09:49:11 -05:00
724856d684
Start working on profile combined
2024-12-06 08:18:08 -05:00
921d53227c
Addressing PR comments.
2024-12-04 12:48:41 -05:00
1a739a12e8
Fixing unique constraints.
2024-12-03 12:18:13 -05:00
34a440a6d7
Fixing migration name.
2024-12-02 18:38:18 -05:00
1f284076ce
Adding a few indexes.
2024-12-02 18:35:18 -05:00
46748210ee
Merge remote-tracking branch 'origin/main' into combined_tables_2
2024-12-02 17:07:03 -05:00
Mikoto
9505d1d205
feat: add PKCE ( #5189 )
...
Co-authored-by: Nutomic <me@nutomic.com>
2024-12-02 16:47:03 -05:00
612c2e916f
Fixing column XOR check.
2024-12-02 16:23:50 -05:00
7fdbb58e98
Fixing migration and paged API.
2024-12-02 13:28:26 -05:00
f25d34656f
Merge branch 'combined_tables_2' of https://github.com/LemmyNet/lemmy into combined_tables_2
2024-12-02 12:56:19 -05:00
dullbananas
588e1f6c0a
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
2024-12-02 12:56:14 -05:00
a9f28af554
Merge remote-tracking branch 'origin/main' into combined_tables_2
2024-11-28 18:25:55 -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
d8dda44010
Adding profile.
2024-11-27 16:37:05 -05:00
0ba961ff5c
Adding tests, triggers, and history updates for report_combined.
2024-11-27 16:02:11 -05:00
1ff8ae0641
Finishing up combined report table.
2024-11-26 16:53:01 -05:00
39b3ec2473
Combined tables try 2
2024-11-26 09:27:05 -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
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
dce6c6bbf0
Move aggregates to replaceable_schema, fix error ( fixes #5186 ) ( #5190 )
...
* Move aggregates to replaceable_schema, fix error (fixes #5186 )
* fmt
* r prefix
2024-11-12 12:03:30 -05:00
dullbananas
2e8687e203
Combine action tables ( #4459 )
...
* Update comment_report_view.rs
* Update comment_report_view.rs
* Update post_view.rs
* Update utils.rs
* Update schema.rs
* stuff
* stuff
* fix actions
* PostLike
* fmt
* more post stuff (partial)
* remove uplete
* returning
* rename read_comments field
* PersonPostAggregates
* a
* fix usage of read_comments_amount
* comment
* community
* community_block
* instance_block
* LocalUser::export_backup
* person_block
* person
* stuff (partial)
* update cargo.lock
* fix lemmy_db_schema
* post_view
* comment_report_view
* comment_view
* post_report_view
* find and replace some selected values
* private_message_view
* vote_view
* comment_reply_view
* some action views
* action_query, find_action
* community_view
* block views
* person_mention_view
* remove struct update
* refactor actions function
* actions_alias
* clean up return types and trait bounds
* fix all rust code
* fmt
* clippy fix
* Migrate tables
* migrate indexes and contraints, and add statistics
* fix what appears to be a messed up merge
* commented thing
* Create uplete.rs
* Update uplete.rs
* Update uplete.rs
* Update up.sql
* Update comment.rs
* Update Cargo.toml
* Update comment.rs
* Update post.rs
* Update comment_view.rs
* Update post_view.rs
* Update comment_reply_view.rs
* Update person_mention_view.rs
* Update Cargo.toml
* Update utils.rs
* Update comment.rs
* Update utils.rs
* Update uplete.rs
* Update uplete.rs
* Update uplete.rs
* Update comment.rs
* Update uplete.rs
* Update uplete.rs
* Update uplete.rs
* Update uplete.rs
* Update uplete.rs
* Update uplete.rs
* Update comment_view.rs
* Update post_view.rs
* Update triggers.sql
* Update triggers.sql
* Update triggers.sql
* Update comment_reply_view.rs
* Update person_mention_view.rs
* Update person_mention_view.rs
* Update comment_reply_view.rs
* Update uplete.rs
* start removing post_id column
* Update down.sql
* Update schema.rs
* Update comment.rs
* Update comment.rs
* Update comment.rs
* Update schema.rs
* Update comment.rs
* Update like.rs
* Update comment.rs
* Update up.sql
* Update down.sql
* Update down.sql
* Update up.sql
* Update up.sql
* Update down.sql
* Update comment.rs
* Update vote_view.rs
* Update vote_view.rs
* Update comment_aggregates.rs
* Update person_aggregates.rs
* Update comment_view.rs
* Update vote_view.rs
* Update mod.rs
* Update create.rs
* Update comment.rs
* Update community.rs
* Update community.rs
* Update up.sql
* Update uplete.rs
* Update uplete.rs
* revert to UpleteCount
* Update comment.rs
* Update traits.rs
* Update comment.rs
* Update community.rs
* Update community_block.rs
* Update community.rs
* Update instance_block.rs
* Update instance.rs
* Update community_block.rs
* Update person.rs
* Update person_block.rs
* Update person.rs
* Update person_block.rs
* Update person.rs
* Update instance.rs
* Update instance_block.rs
* Update instance.rs
* Update person.rs
* Update post.rs
* Update comment.rs
* Update community.rs
* Update person.rs
* Update post_view.rs
* Update comment.rs
* reduce diff
* revert some changes in views
* Update post_view.rs
* Update comment.rs
* Update post.rs
* fix missing cfg_attr
* rewrite uplete
* Update Cargo.toml
* Update Cargo.toml
* Update uplete.rs
* add `pub` to structs that appear in trait bounds
* optional = true
* Update uplete.rs
* Update community.rs
* Update comment.rs
* Update uplete.rs
* Update uplete.rs
* Update uplete.rs
* Update uplete.rs
* something is wrong with me
* use new uplete function everywhere
* fmt
* fmt
* Keep post_id when comment_actions::liked is not null
* Update up.sql
* Update up.sql
* clean up up.sql
* clean up down.sql
* fix
* Update person_aggregates.rs
* fmt
* Update uplete.rs
* fmt
* Update uplete.rs
* Update community.rs
* Update uplete.rs
* Update local_user.rs
* fmt
* fix
* fix
* fmt
* improve uplete api
* Update uplete.rs
* fix
* fix
* Update uplete.rs
* Update uplete.rs
* Update uplete.rs
* Update uplete.rs
* fix
* fix test
* fix db_views_actor imports
* fix uplete import in post_view test
* rerun ci
* fix AllNull syntax error
* fix DynColumn
* Fix rust syntax
* fmt
* fix iter
* pain
* Update community_moderators.rs
* Update community_moderator_view.rs
* Update uplete.rs
* Fix mistake found by chatgpt
* revert debugging stuff, change migration date, refactor constraint
* Update down.sql
* Update down.sql
* fmt
* make things added to db_schema::utils more understandable
* update rust version for woodpecker
* finish merge
* Fix index that checked read_comments twice instead of also checking read_comments_amount
* fix
* uplete: test_count, test_generated_sql_setting_one_column_null, test_count_methods
* refactor uplete sql test
* test setting both columns to null in uplete
* make AllNull generic
* test AllNull
* Merge remote-tracking branch 'upstream/main' into smoosh-tables-together
---------
Co-authored-by: phiresky <phireskyde+git@gmail.com>
2024-11-11 11:34:10 +01:00
Dessalines
39eeb2cbb3
Allow disabling private messages. Fixes #3640 ( #4094 )
...
* Allow disabling private messages. Fixes #3640
* Fix typo.
* Fixing local user check in apub code.
* Removing pointless local check.
2024-11-07 22:16:28 -05:00
ad90cd77f9
Implement private communities ( #5076 )
...
* add private visibility
* filter private communities in post_view.rs
* also filter in comment_view
* community follower state
* remove unused method
* sql fmt
* add CommunityFollower.approved_by
* implement api endpoints
* api changes
* only admins can create private community for now
* add local api tests
* fix api tests
* follow remote private community
* use authorized fetch for content in private community
* federate community visibility
* dont mark content in private community as public
* expose ApprovalRequired in api
* also check content fetchable for outbox/featured
* address private community content to followers
* implement reject activity
* fix tests
* add files
* remove local api tests
* dont use delay
* is_new_instance
* single query for is_new_instance
* return subscribed type for pending follow
* working
* need to catch errors in waitUntil
* clippy
* fix query
* lint for unused async
* diesel.toml comment
* add comment
* avoid db reads
* rename approved_by to approver_id
* add helper
* form init
* list pending follows should return items for all communities
* clippy
* ci
* fix down migration
* fix api tests
* references
* rename
* run git diff
* ci
* fix schema check
* fix joins
* ci
* ci
* skip_serializing_none
* fix test
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2024-11-07 05:49:05 -05:00
4690aff1e5
Run analyze after changing post.url type (ref #4983 ) ( #5148 )
...
* Run analyze after changing post.url type (ref #4983 )
* rename back
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2024-11-04 14:16:54 +01:00
Dessalines
cdc1cf3bf7
Adding community description in addition to sidebar, like site. ( #5120 )
...
* Adding community description in addition to sidebar, like site.
- Also made changes to lemmy's group apub to be similar to its site,
which uses content for the sidebar, and summary for the short
description.
- Fixes #5078
* Fixing tests.
* Remove comment.
* Fix name for description checker.
2024-10-28 11:54:36 -04:00
f05afead02
Remove individual user/community inboxes ( #5124 )
...
* Remove endpoints for individual community/user inboxes
fixes #4147
fixes #3928
* Remove shared_inbox_url columns
* fmt
2024-10-26 14:54:29 -04:00
925826170f
Remove comment_like.post_id column which is unnecessary (ref #5122 ) ( #5134 )
2024-10-26 14:45:12 -04:00
Dessalines
ffb94fde85
Adding local site settings to reject federated upvotes or downvotes. ( #5038 )
...
* Adding local site settings to reject federated upvotes or downvotes.
- Should help defend against downvote spamming instances.
- Fixes #4086
* Adding new vote mode types.
* Simpler activitypub vote check.
* Adding undo vote for failed vote mode check.
* Update crates/api_common/src/utils.rs
---------
Co-authored-by: Nutomic <me@nutomic.com>
2024-10-02 06:55:37 -04:00
SleeplessOne1917
33cbd95b7e
Add skip_serialize_none to OAuth structs with option fields ( #5046 )
...
* Add skip_serialize_none to OAuth structs with option fields
* PR feedback
* Remove serde and ts export from SSO db-only structs
2024-09-26 10:24:51 +02:00
Dessalines
a65be776e3
Remove redundant local_user.auto_expand setting. ( #5041 )
...
- Fixes #4643
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
2024-09-24 08:55:09 -04:00
9eee61dd06
Post scheduling ( fixes #234 ) ( #5025 )
...
* Post scheduling (fixes #234 )
* clippy
* replace map_err with inspect_err
* ignore unpublished posts in read queries
* add api test
* fmt
* add some checks
* address some review comments
* allow updating schedule time
* rewrite scheduled task
* fmt
* machete
* compare date in sql, more filters
* check for community ban in sql
* remove api test (scheduled task only runs every 10 mins)
* remove mut
* add index
* remove Post::read impl
* fmt
* fix
* correctly handle changes to schedule time
* normal users can only schedule up to 10 posts
2024-09-24 05:39:40 -04:00