* 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>