* Add post_actions.disable_notifications (fixes#3042)
* Split up logic for send_local_notifs()
* refactor
* fmt
* add api endpoint, check
* dont call send_local_notifs from comment delete/remove
* move scrape_text_for_mentions() inside send_local_notifs()
* nullable
* simplify
* handle parent notification first
* cleanup
* remove `CommentResponse.recipient_ids`
* post notifications enum
* Follow posts (fixes#3069)
* use references
* cleanup
* new file
* db migration to merge mention, reply tables
* code adjustments
* adjust test code
* adjust enum case
* wip: get rid of inbox_combined table
* add table local_user_notification
* tests compiling
* get rid of inbox_combined, only use notification table
* rename view
* notify private messages
* clippy
* copy existing data
* wip: tests
* move tests
* clippy
* notify post subscribers
* community subscribe
* test fixes
* migration fix
* rename routes
* separate struct for api
* rename api params
* merge migrations
* separate notification modes for post/community
* fix
* down migration copy data
* test fix
* update api tests
* only single notification table
* clippy
* use local user id for recipient
* fix comments
* rename table
* recipient local user
* add indices
* keep local user id
* renames and cleanup
* NotificationDataType
* change notification response
* fix api tests
* test fix
* remove private_message.read
* fixes
* test fix
* fix
* Keep totals of upvotes and downvotes given to each user.
- Adds a `voted_at`, `upvotes` and `downvotes` to person_actions.
- Didn't use triggers, because I couldn't figure out how to get the
voter, and also because it should only be for local users anyway.
- Fixes#2370
* Clippy
* Adding history filling.
* Try to fix postgres alias error 1
* Update crates/db_schema/src/impls/person.rs
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
* Addressing PR comments
* Removing commented line.
* Fixing type errors.
* Fixing test
* Fixing like score 0 and api test errors.
* Some clippy fixes
* Update migrations/2025-06-14-141408_person_votes/up.sql
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Update migrations/2025-06-14-141408_person_votes/up.sql
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Update migrations/2025-06-14-141408_person_votes/up.sql
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Formatting sql
* Fixing migration.
* Cleaning up merge
---------
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Switch to library for rate limit (fixes#5550, fixes#5548)
* move debug rate limit logic
* move to file
* various rate limit methods
* move to utils crate
* use new code
* delete old rate limit code
* live updates
* live updates working
* clippy
* use binary keys
* clippy
* remove error
* cleanup
* Implement multi-community (fixes#818, fixes#5340)
* db methods
* add api methods
* ts opt
* wip
* sql queries
* cleanup
* wip: federation
* query by name
* add ap_id column
* add read_apub, compiles now
* validate multi-comm name
* disallow removed, deleted, private
* scheduled task
* remove piefed test
* resolve_object with workaround
* review
* avoid db read
* api client
* fix api test fetch
* wip: test cases
* wip
* add max elements, array_remove comments
* simplify post view query
* mvoe structs
* fix api test
* fix api test
* rename to suggested_communities, add api param
* filter removed/deleted
* check_api_elements_count
* filter out removed/deleted during update
* inner join
* add listing type suggested
* db schema changes
* transaction
* address some review comments
* separate methods for create, delete entry
* update js client
* get multi
* remove CommunityOrMulti
* check helper, other stuff
* fix api test
* change get multi comm return type
* Replace MultiCommunityView with GetMultiCommunityResponse
* get rid of todo
* add local column, admins can edit local multi-comm
* implement multi-comm follow (db and api)
* api for multi-comm follow
* move and rename MultiCommunityApub
* move multi-comm to apub-objects
* move multi-comm url to top-level
* list multi-comms followed by user
* add todo
* remove param
* update local follows
* update query
* db functions and tests
* cleanup
* fix api test
* add entry limit
* rewrite links
* federation changes
* wip federation
* simplify generate_activity_id
* more wip
* more wip
* multi-comm follow
* federate changes
* cleanup
* clippy
* test fixes
* fmt
* fix
* wip: update follows after federated multi-comm change
* remove scheduled task
* update follows after multi update
* fmt
* fixes
* review comments
* indexes
* remove MultiCommunityApub
* fix test
* ts fix
* review
* db schema for local_site.multi_comm_follower
* adjust code and tests
* fixes
* cleanup, comment
* fix tests
* fix
* remove more test code
* fix new install
* add index
* fix api tests
* fix
* remove index
* more fix
* Implement multi-community search (fixes#5778) (#5779)
* Implement multi-community search (fixes#5778)
* fixes
* search title and description
* MultiCommunityView
* rename fields
* revert test change
* Adding migration for renaming timestamps to at
* Running format.
* Updating code to _at
* Fix replaceable schema
* Fixing scheduled tasks.
* Fixing and cleaning up api tests.
* Fixing cargo shear.
* Resolve objects as part of search api call (fixes#5740)
* clippy
* use search response, cleanup test
* update api tests
* fix error handling
* another fix
* add calls to submit_activity and use SiteOrCommunity
* add send_activity imports
* use separate CreateReportToSite and SendResolveReportToSite variants
* fix api compile errors
* allow apub Report struct to represent community report
* change argument types of Report::new, Report::send, and report_inboxes
* impl Object for ReportableObjects
* impl Actor for SiteOrCommunity
* change return types of ReportObject::dereference and ReportObject::object_id
* Add verify_person_in_site_or_community
* replace Report::community with Report::recipient to return either site or community, and add SiteOrCommunity::local_community
* fix Report::receive
* fix ResolveReport::send
* fix ResolveReport
* fix match_outgoing_activities
* replace recipient with receiver
* lint
* update cargo.toml files
* start removing new custom enums
* Revert "start removing new custom enums"
This reverts commit 8208c8a8b1.
* remove new trait impls on enums
* change reportableobjects to type alias that uses either
* fix fetcher::report
* find and replace reportableobjects variant names
* delete crates/utils/translations
* remove uses of custom siteorcommunity enum
* clippy
* dont use separate module for reportableobjects
* remove ResolveReport::reciever
* replace match in activity_lists with Report::community
* combine variants for community and site in SendActivityData enum
* add reportCommunity function to shared.ts
* fix rust errors
* lint
* change the condition for community reports when listing unresolved reports
* update lemmy-js-client
* fix pnpm-lock.yaml
* api test
* use same null check that's used elsewhere
* federate report activities to report creator's instance
* Apply suggestions from code review
Co-authored-by: Nutomic <me@nutomic.com>
* remove report_remote_inboxes
* remove Report::receiver
* remove verify_admin_action
* move verify_mod_or_admin_action
* always hide reports of remote communities
* refactor local_community
* remove unconditional hiding of reports of remote communities
---------
Co-authored-by: Nutomic <me@nutomic.com>
* Migrations before column fixes
* Change local_image to reference person_id, to track thumbnail creators.
- Fixes#5564
* Fixing API tests.
* Increase the post query duration time. #5661
* Adding thumbnail_and_post_id column
* Forgot ts-optional
* Fixing post spec tests.
* Try using promise.allSettled to ignore errors.
* Using consistent pictrs api key.
* Dont fetch thumbnails for user API.
* Dont delete thumbnails for user deletion.
* Dont filter out thumbnail images when fetching or deleting.
* Update crates/api_common/src/utils.rs
Co-authored-by: Richard Schwab <gitrichardschwab-7a2qxq42kj@central-intelligence.agency>
* Addressing PR comments
* Add comment.
* Rename to thumbnail_for_post_id
* Addressing PR comments
---------
Co-authored-by: Richard Schwab <gitrichardschwab-7a2qxq42kj@central-intelligence.agency>
* Adding admin image deletion endpoint.
- Also moving the list media endpoints, since these can go under a
common heading.
- Fixes#5563
* Changing list_all to list
* Fixing api tests.
* Delete all aliases.
* Fixing comment.
* Updating lemmy-js-client.
* Add plugin system (fixes#3562)
* loading changes
* Use golang for default plugin (faster to compile)
* add remaining pre hooks
* Add remaining plugin hooks
* clippy
* Dont crash if plugin folder cant be read
* add metadata to /api/v4/site
* use plugin pool
* fix api common
* move plugin code to separate repo
* remove dbg
* fix api tests
* Add private message hooks
* only load plugin for epsilon test instance
* 1s timeout
* load plugin over http
* no return value for pre hooks
* dont run plugin hook code if no plugins loaded
* make plugin calls async
* clippy
* spawn_blocking
* fix vote hooks, add lemmy_url
* update before hooks, vote hooks
* adjust post hooks
* rename functions
* expose lemmy version to plugins
* fix hooks
* fix again
* update plugin
* not mut
* clippy
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
* Block NSFW content on instances with it disabled
* Make disallow_nsfw_content a local_site setting
* Clippy
* Add comma
* SQL fmt
* Newline
* Use func in apub + update js-client
* Remove extra db queries, add purge_post_images
* Add back local_site to funcs that need it
* Fix tests
* Add delay to api test
* Address comments
* Cleanup
* Return results from db func
* fmt
* Remove unneeded result
* Sync translations
* Allow sending report only to admins (fixes#2414)
* fix api test
* Rename `to_local_admins` to `violates_instance_rules`
* Review fixes
* fix api test
* Federete resolve report action (fixes#4744)
* working
* clippy and fixes
* fix test
* verify mod action
* add workaround for test
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
* 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.
* Starting to work on search combined.
* Fix
* Removing serialization
* Removing serialization
* 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.
* Adding search combined view, need to write tests yet.
* Filters done, working on tests.
* Adding tests for person, post, and community.
* Finishing up tests.
* 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.
* Formatting sql.
* Formatting sql 2.
* Fixing search result, running clippy.
* Fixing ts_option.
* Adding search_combined.score column, and DB triggers.
* Fixing API tests.
* Adding an index for score.
* Update crates/db_schema/src/newtypes.rs
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Avoiding inner joins for up.sql
* Adding person_aggregates.published column.
---------
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* 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.
* 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>