* Re-organizing federation tests. #746#1040
* Adding federation support for user bios. Fixes#992
* Adding icons, banners, and preferred usernames.
- Added optional community icons, and community banners.
- Added user banners.
- Added Site icon and banner, with custom favicon.
- Set up preferred usernames. Fixes#1017
- Added an additional post sort: Active
- Hot rank now uses the published time.
- Active uses the most recent comment time, and is default.
- DB Migration was required to add all these fields to the views.
- Added transfercommunity helper function.
- Removed title column from communities page.
- Abstracted an image-upload-form.tsx, and a banner-icon-header.tsx
- Fixes#899
* Some navbar fixes.
* Fixing css
* Some fixes.
- Showing correct user icon and banner after save without page reload.
- Abstracting diesel update overwrite.
- Adding some docs.
* Adding @ when a user doesn't have a preferred username.
Merge branch 'main' into more-inbox-permissions
Move check_community_ban() into helper function
Move slur check into helper functions
Move Claims::decode and site ban check into helper function
Note: this changes behaviour in that site ban is checked in more
places now. we could easily add a boolean parameter
check_for_site_ban to get the previous behaviour back
Rewrite user_inbox and community_inbox in the same way as shared_inbox
Add check against instance allowlist etc in shared_inbox
Co-authored-by: dessalines <dessalines@noreply.yerbamate.dev>
Co-authored-by: Felix Ableitner <me@nutomic.com>
Reviewed-on: https://yerbamate.dev/LemmyNet/lemmy/pulls/76
* Add user bios
* Version v0.7.35
* Add domain name change instructions to docs. (#1044)
* Add domain name change instructions to docs.
* Changing docker execs to docker-compose execs
* Set maxLength to user bio and render as md
* Fix bio updating after SaveUserSetting
Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
* Adding visual captchas for register and login.
* Adding audio wav file for Captcha using espeak.
* Lots of captcha fixes.
- Removed login captchas.
- Added settings to disable captchas, and change difficulty.
- Captchas can only be checked / used once, front end gives a new one on
failure.
- Added front end button for regenerating captcha.
- Added a disabled / pause button audio playing.
* Some more fixes.
* Remove extra jwt claims (for user settings)
- The JWT token only contains the issuer, and your user id now.
- Now only a page refresh is necessary to pick up your settings on all
clients, including theme, language, etc.
- GetSiteResponse now gives you your user and settings if logged in.
- Fixes#773
* Remove extra comment line, I tested nsfw
* Adding a todo to add a User_::readSafe()
* 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>
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.
* Asyncify more
* I guess these changed
* Clean PR a bit
* Convert more away from failure error
* config changes for testing federation
* It was DNS
So actix-web's client relies on TRust DNS Resolver to figure out
where to send data, but TRust DNS Resolver seems to not play nice
with docker, which expressed itself as not resolving the name to
an IP address _the first time_ when making a request. The fix was
literally to make the request again (which I limited to 3 times
total, and not exceeding the request timeout in total)
* Only retry for connecterror
Since TRust DNS Resolver was causing ConnectError::Timeout,
this change limits the retry to only this error, returning
immediately for any other error
* Use http sig norm 0.4.0-alpha for actix-web 3.0 support
* Blocking function, retry http requests
* cargo +nightly fmt
* Only create one pictrs dir
* Don't yarn build
* cargo +nightly fmt
- Advanced code migrations now disable then re-enable triggers.
Brings run time down to < 15 seconds, no need to thread them.
- Changing ap_ids and actor_ids in migrations to a fake url,
so it doesn't break XsdAnyUri in activitystreams.
- HTTP and APUB clients can now send live updating messages to websocket
clients
- Rate limiting now affects both HTTP and websockets
- Rate limiting / Websocket logic is now moved into the API Perform
functions.
- TODO This broke getting current online users, but that will have to
wait for the perform trait to be made async.
- Fixes#446
- Creating an activity table.
- Adding some federation-related columns to the user_ and community
tables.
- Generating the actor_id and keys in code, updating the tables.