* 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.
* 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.
* Running prettier.
* A few more fixes.
* Moving diesel schema check back down.
* Addressing PR comments.
* Changing back request head to get.
* Fixing lockfile.
---------
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
* Add a blocklist for URLs.
* Fix SQL format
* Make clippy happy.
* Use regex for URL matching.
* Escape regex chars in URLs.
* Use post for modification.
* Make URL block regex static and remove API routes.
* Add date fields to table and use transaction.
* Use Cache for blocklist.
* Rename check_links + move list to parameters of process_markdown.
* SQL format.
* Format, again.
* Remove println.
* Add API test.
* Set a shorter lifetime for regex in debug mode.
* Add missing macro.
* Update lemmy-js-client
* Update api_test/pnpm-lock.yaml
* Don't break other tests
* Use different URL for test
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Nutomic <me@nutomic.com>
* Adding ability to hide posts.
- Adds an post/hide API route.
- Adds a `show_hidden` (default false) to `GetPosts`.
- Adds a `hidden` field to `PostView`.
- Removes the single `post_id` from MarkPostAsRead.
- Fixes#1403
* Add a check to make sure hidden field is true.
* Fixing test.
* Add back semicolon
* Add support for local only community (fixes#1576)
* add filters and tests to db views
* dont federate local only community
* test get apub community http
* tests
* more checks
* wip
* api test
* fix tests
* change community.local_only column to visibility enum
(for private communities)
* sql fmt
* rename vars
* clippy
* fix tests
* update lib
* review
* fix js client version
* update client
* Add markdown rule to add rel=nofollow for all links
* Add markdown image rule to add local image proxy (fixes#1036)
* comments
* rewrite markdown image links working
* add comment
* perform markdown image processing in api/apub receivers
* clippy
* add db table to validate proxied links
* rewrite link fields for avatar, banner etc
* sql fmt
* proxy links received over federation
* add config option
* undo post.url rewriting, move http route definition
* add tests
* proxy images through pictrs
* testing
* cleanup request.rs file
* more cleanup (fixes#2611)
* include url content type when sending post over apub (fixes#2611)
* store post url content type in db
* should be media_type
* get rid of cache_remote_thumbnails setting, instead automatically
take thumbnail from federation data if available.
* fix tests
* add setting disable_external_link_previews
* federate post url as image depending on mime type
* change setting again
* machete
* invert
* support custom emoji
* clippy
* update defaults
* add image proxy test, fix test
* fix test
* clippy
* revert accidental changes
* address review
* clippy
* Markdown link rule-dess (#4356)
* Extracting opengraph_data to its own type.
* A few additions for markdown-link-rule.
---------
Co-authored-by: Nutomic <me@nutomic.com>
* fix setting
* use enum for image proxy setting
* fix test configs
* add config backwards compat
* clippy
* machete
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
* Add upload timeout to PictrsConfig
* Bad space 🤔
* Update PictrsConfig upload timeout to include units.
* Add local_subscribers field to CommunityAggregates
struct and schema
* sql format
* local_subscribers test
* fix local_subscribers test
* Revert "fix local_subscribers test"
This reverts commit 4bbac5ce4a.
* Revert "local_subscribers test"
This reverts commit 735107e1f7.
* Create trigger for local_subscribers
* Rename variable
* re-trigger ci
* re-trigger ci
* Add local_subscribers count to follow.spec.ts
* Rename local_subscribers to subscribers_local
* Add subscribers_local to community_aggregates
* added subscribers_local to the aggregate tests
* Check if person exists on community_follower trigger
* Delete community follows before deleting person
* Update lemmy-js-client in api_tests
* Refactor local_subscriber migration
* fix format
* Move migration files date to now
* Fix test to wait for aggregates to federate
* re-trigger ci
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
* Add voters to active users
* Edit formatting
* Edit formatting
* Edit formatting in down.sql
* Fix person table inner joins
* Remove post read from calculations
* Merge /site_inbox into /inbox (fixes#4137)
Get rid of different inboxes, only use /inbox
Remove shared_inbox_url db columns
add code migration
move to db migration, fixes
machete
fix sql
drop inbox url unique constraints
Dont create auth cookie in backend (#4136)
dont change individual inboxes to shared inbox
Dont send comment reply to user who has community blocked. Fixes#3684 (#4096)
* Dont send comment reply to user who has community blocked. Fixes#3684
* Adding source instance block check.
* Adding api test.
* Addressing PR comments.
* move site inbox rewrite to db
* fix test
* clippy
* clippy 2
* fix test
* Fix hot_rank algorithm pushing downvoted content off the feed.
- Max hot_rank algorithm now uses max(2, score) rather than greatest(1, score + 3)
- Fixes#4084
* Fixing SQL format.
* Adding 2 to bias the positive scores.
* Handle invalid ban expires values (fixes#4045)
* Adding a few missing expire time checks. Fixing up time conversions. (#4051)
* Adding a few missing expire time checks. Fixing up time conversions.
* Increase settings export wait time.
* get rid of RemoveCommunity.expires
* fmt
* tests
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
* feat: Add user setting for toggling avatar gif animations
* Add forgotten post listing mode option to settings form
* Fix compilation error
* Fix formatting
* Change name of column to be more general purpose
* Fix sql format.
* Fix comments
* Running format.
---------
Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
* wip
* stuff
* fmt
* fmt 2
* fmt 3
* fix default feature
* use Authorization header
* store ip and user agent for each login
* add list_logins endpoint
* serde(skip) for token
* fix api tests
* A few suggestions for login_token (#3991)
* A few suggestions.
* Fixing SQL format.
* review
* review
* rename cookie
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
* Rework the way 2FA is enabled/disabled (fixes#3309)
* postgres format
* change algo to sha1 for better compat
* review comments
* review
* clippy
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
* User can block instances (fixes#2397)
* update comments
* review comments
* use route
* update
* add api test
* update tests
* fix
* fix test
* ci
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>