* 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.
* Add LemmyResult to session_middleware tests
* Add LemmyResult to inboxes tests
* Add LemmyResult to slurs tests
* Add LemmyResult to markdown tests
* Add LemmyResult to rate_limiter tests
* Add LemmyResult to error tests
* Add LemmyResult to api_common utils tests
* Add LemmyResult to request tests
* Add LemmyResult to claims tests
* Propagate registration_applications errors
* Remove clippy::unwrap_used from community tests
* Add LemmyResult to community_view tests
* Add LemmyResult to db_schema post tests
* Add LemmyResult to site_aggregates tests
* Add LemmyResult to private_message tests
* Add LemmyResult to activity tests
* Add LemmyResult to federation_allowlist tests
* Add LemmyResult to comment_aggregates tests
* Add LemmyResult to post_report tests
* Add LemmyResult to moderator tests
* Add LemmyResult to community_aggregates tests
* Add LemmyResult to person_aggregates tests
* Add LemmyResult to language tests
* Add LemmyResult to post_aggregates tests
* Add LemmyResult to db_schema comment tests
* Add LemmyResult to actor_language tests
* Add LemmyResult to vote_view tests
* Add LemmyResult to registration_application_view tests
* Add LemmyResult to private_message_view tests
* Add LemmyResult to private_message_report_view tests
* Add LemmyResult to post_report_view tests
* Add LemmyResult to comment_report_view tests
* Add LemmyResult to sitemap tests
* Replace .expect() with .unwrap()
* Format code
* Remove clippy::unwrap_used from activity tests
* Add diesel result in db_schema tests
* Format code
* Map to_bytes() error to LemmyErrorType
* Remove clippy::unwrap_used from error tests
* Removing a few more unwraps, and cleaning up language code.
* Replace map_err with unwrap_or_default
* Replace ok_or with and_then
---------
Co-authored-by: Dessalines <tyhou13@gmx.com>
* 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
* Adding saved_only, liked_only, and disliked_only filters to search.
- Fixes#4547
* Removing duplicate Url return type for search (was actually post).
- This now works like the post_title_only filter.
* Address PR comments.
* Add saved_only post_view test.
* Ignore zero values when setting rate limits (fixes#4280)
Havent bothered to add an error message for such an uncommon case.
* fmt
* reorder, add test
* Add custom_emoji list route
* Add tagline list route
* Apply linting
* Remove unecessary TaglineView
* Add category filter for custom emoji
* Add create tagline endpoint
* Add update tagline endpoint
* Add delete tagline endpoint
* Format through lint.sh
* Remove custom_emojis and taglines from site resource
* Get random tagline on site requets
* Impl Crud for Tagline
Remove superfluous properties
* Move tagline endpoints under /admin
* Impl Crud for CustomEmoji
* Remove delete from tagline and custom emoji impls
* Check markdown for tagline
* Validate markdown on tagline
* Make content fields non optional
Add error types for tagline validation
* Use process_markdown instead of process_markdown_opt
* Consolidate Tagline error types
* Remove unecessary clone
* Updat misleading comments
* Remove local_site_id from tagline and custom_emoji
* Update TaglineInserForm and TaglineUpdateForm
* Add ignore_page_limits for custom emojis
EmojiPicker needs to be able to retrieve all emojis in 1 call
* Update custom_emoji_view
Only keep get_all als helper function calling list with paging ignored
Only order on category when filtering on category
* Removing pointless get_all fn.
* remove tagline length checks
* make fields of TaglineInsertForm and TaglineUpdateForm mandatory
* move emoji order statement
* add comment for GetSiteResponse.tagline
---------
Co-authored-by: Freakazoid182 <>
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Felix Ableitner <me@nutomic.com>
* Adding a default_comment_sort_type column for local_site and local_user.
- Renamed SortType to PostSortType in the DB and code.
- Renamed references to default_sort_type to default_post_sort_type.
- Fixes#4128
* Renaming migration to current date.
* Simplifying PostSortType.
* Added OAUTH2 OIDC support
* Fixes and improvements based on review feedback
* use derive_new::new instead of TypedBuilder
* merge migrations into a single file
* fixes based on review feedback
* remove unnecessary hostname_ui config
* improvement based on review feedback
* improvements based on review feedback
* delete user oauth accounts at account deletion
* fixes and improvements based on review feedback
* removed auto_approve_application
* support registration application with sso
* improvements based on review feedback
* making the TokenResponse an internal struct as it should be
* remove duplicate struct
* prevent oauth linking to unverified accounts
* switched to manually entered username and removed the oauth name claim
* fix cargo fmt
* fix compile error
* improvements based on review feedback
* fixes and improvements based on review feedback
---------
Co-authored-by: privacyguard <privacyguard@users.noreply.github.com>
* Adding a URL max length error.
- Also increasing the post.url max length to 2000 (seems standard)
- I ran into this when fixing torrent support, which often use longer
urls.
* Fixing sql_format.
* pass local user to send local notif
* pass local user to all crud calls
* execution of command "cargo +nightly fmt"
* Formatting and mode fixes.
---------
Co-authored-by: Dessalines <tyhou13@gmx.com>
* Make sure you can view your moderated deleted and removed communities.
- The front end checks to see whether you are a mod, in order to be
able to restore deleted / removed communities. This removes a filter
which prevents that.
- Fixes#4911
* Only show deleted communities to creator, and removed to admins.
* Addressing PR comments.
* Adding checks for higher admin and mod.
* Adding admin/mod checks for ban and comment removal.
* Combining mod or admin check with an SQL union.
* Making community ban or add mod also allow higher admins.
* Making sure remove post also checks higher mods or admins.
* Add unit test for is_higher_mod_or_admin_check
* Fixing comment.
* Addressing PR comments.
* Get rid of pointless wrapper functions, return lemmyresult directly.
* Fixing not being able to create comments on local community posts.
- This was caused by not passing my_person_id into various
`CommentView::read` functions.
- Fixes#4853
* Refactoring views to use local_user, rather than person
* Addressing PR comments.
* Fixing API tests.
* Allow empty string to clear URL-type DB fields.
- To address difficulties with clearing URL-type fields like
avatars, banners, site icons, this PR turns the URL type form
fields into strings.
- This allows an empty string to be used as a "clear data", as
in the case with the regular text form fields.
- Also includes various cleanups.
- Fixes#4777
- Context: #2287
* Fixing comment.
* Use Option<&str> and deref.
---------
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
* After creating a comment, update the unread comments for the post.
- Fixes#3863
* Addressing PR comments.
* Add comment.
---------
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
* Adding an image_details table to store image dimensions.
- Adds an image_details table, which stores the height,
width, and content_type for local and remote images.
- For LocalImages, this information already comes back with
the upload.
- For RemoteImages, it calls the pictrs details endpoint.
- Fixed some issues with proxying non-image urls.
- Fixes#3328
- Also fixes#4703
* Running sql format.
* Running fmt.
* Don't fetch metadata in background for local API requests.
* Dont export remote_image table to typescript.
* Cleaning up validate.
* Dont proxy url.
* Fixing tests, fixing issue with federated thumbnails.
* Fix tests.
* Updating corepack, fixing issue.
* Refactoring image inserts to use transactions.
* Use select exists again.
* Fixing imports.
* Fix test.
* Removing pointless backgrounded metadata generation version.
* Removing public pictrs details route.
* Fixing clippy.
* Fixing proxy image fetching. Fixes#4703
- This extracts only the proxy image fixes from #4704, leaving off
thumbnails.
* Fix test.
* Addressing PR comments.
* Address PR comments 2.
---------
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
- Diesel ordinarily throws an error when no results are returned for a
single fetch, which is a bit confusing. This PR ensures that the
missing value cases are all caught, and wrapped with new LemmyErrors,
rather than diesel errors.
- Fixes#4601
* Fixing bug where comment replies wouldn't be sent to blocked instances.
- Instance blocks should only affect communities, not comments.
- Fixes#4590
* Revert "Fixing bug where comment replies wouldn't be sent to blocked instances."
This reverts commit 1349aa351a.
* Only block replies from the community's instance id.
- Also refactor send_local_notifs slightly, since it has to fetch the
community now.
- Fixes#4590
---------
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>