* added serverside url validation
* api.post: use if let instead of is_some
also add "invalid_url" to en.json
Co-authored-by: John Doe <dhas8m@protonmail.com>
Merge branch 'main' into more-upgrade-apub-3
Update activitystreams library to latest version
Remove remaining usages of old activitystreams library
Migrate community inbox and user inbox
Migrate private message
Migrate post
Migrate community activities
Migrate extensions to new activitystreams library
Co-authored-by: dessalines <dessalines@noreply.yerbamate.dev>
Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/71
* secure the `EditPost` API endpoint
* Check user is moderator in BanFromCommunity
* secure the `EditComment` API endpoint
* pass orig `read` prob when not explicitly updating it.
* Block random users from adding mods.
* use cleaner logic from `EditPost`
* prevent editing a community by a mod from transfering ownership to them
* secure `read` action in `EditPrivateMessage`
* Add check in UserMention
* only let the indended recipient mark as read
* simplify booleans to satisfy clippy
* requested changes + cargo +nightly fmt
* fix to pass federation tests for deleting comments and posts
Co-authored-by: chiminh <chiminh.tutanota.com>
Co-authored-by: Hex Bear <buildadangtrain@protonmail.com>
* Adding a configurable config location through an env var.
- Its `LEMMY_CONFIG_LOCATION`
- Fixes#764
* Using a static for CONFIG_FILE again.
* Make clippy happy
- Add a regex that checks if string contains anything but whitespace
- Check for whitespace-only titles on post creation and edit
- Trim whitespace from titles before saving
- Add frontend validation to title
More fixes
- fixed docker builds
- fixed mentions regex test
- fixed DATABASE_URL stuff
- change schema path in diesel.toml
Address review comments
- add jsonb column back into activity table
- remove authors field from cargo.toml
- adjust LEMMY_DATABASE_URL env var usage
- rename all occurences of LEMMY_DATABASE_URL to DATABASE_URL
Decouple utils and db
Split code into cargo workspaces
Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/67
* One pass at materialized views, only about 30% faster, not good.
* Before merging master to test out bans.
* DB Rework working, still need more testing.
* Fixing accidental addadmin bug from asonix async merge.
* Fixing the comment delete trigger
* Some more DB additions.
- Adding a hot_rank desc, published desc index to post_aggregates_fast.
- Removed WITH CTE queries in favor of direct selects (since CTEs cant
use indexes)
* Removing some unecessary indexes.
* Some more DB optimizings
- Changing the fast_id pkeys to just ids on the fast tables.
- Removing the private_message_fast, since the view contains no aggregates.
- Comment and post voting now no longer pull from the views, they update the counts directly.
* Adding community_agg_view and post_agg_views Credit: eiknat.
* Adding user and comment_view migrations. (comment_view still broken)
* Adding more views. Credit Eiknat.