Commit Graph

1332 Commits (2b3fd70afddbe93b60f61ad92acbf246ee0a2206)

Author SHA1 Message Date
Dessalines 2b3fd70afd
Adding ability to restore content on user unban. (#4845)
* Adding ability to restore content on user unban.

- Fixes #4721

* Fixing api tests.

* Fix package.json

* Fixing lemmy-js-client dep.

* Adding API test for restoring content.
1 month ago
privacyguard b26aaac523
SSO Support (#4881)
* 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>
1 month ago
Nutomic 6454a4d43d
Remove enable nsfw (#5017)
* Remove `local_site.enable_nsfw` in favor of `site.content_warning` (fixes #4627)

* cleanup usage of SiteView::read_local

* test

* uppercase
1 month ago
Dessalines 5febf2b8fb
Adding clearurls crate to clean tracking params from links and markdown. (#5018)
* Adding clearurls crate to clean tracking params from links and markdown.

- Thanks to @jenrdikw for creating this
- Fixes #4905

* Upgrading to new version of clearurls

* Fix clippy
1 month ago
Dessalines 987e3f8026
Upgrading webmention to 0.6.0, removes native-tls (#4976) 1 month ago
Carlos Cabello fa192f16bd
Add option to search exclusively by post title (#5015)
* Add option to search exclusively by post title

* Address format issues

* Remove duplicated 'removed' filter

* Replace url_search with search_term

* Build generic PostQuery before search match

* Create default queries. Move title_only to Search struct. Rename Url to PostURL

* Revert PostUrl to Url
1 month ago
Nutomic dea6ee462c
Upgrade http crate (#5006)
* Remove opentelemetry

* remove unused deps, use backtrace

* always print db migration messages regardless of log level (fixes #4725)

* fix ci

* Remove useless root span builder

* Upgrade http and opentelemetry crates

* more fixes

* cleanup

* use release

* upgrade more deps
1 month ago
Dessalines a6220537b5
Increase bio max length from 300 to 1000. (#5014)
- Fixes #4972
1 month ago
Sander Saarend fbb3960c36
Image proxy fixes (#4871)
* Fix remote image urls

* Remove unnecessary URL decode

* Removing the proxy changes.

---------

Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
Co-authored-by: Dessalines <tyhou13@gmx.com>
1 month ago
Nutomic fc13009611
In debug mode allow resolving objects without auth (#5013) 1 month ago
Dessalines d1866cbd04
Remove pointless block_views. (#4841)
- Fixes #4793
1 month ago
Dessalines 84794714da
Removing local_user.show_scores column, since its now on the (#4497)
local_user_vote_display_mode table.

- See https://github.com/LemmyNet/lemmy/pull/4450
1 month ago
Nutomic c90ee3094d
Remove opentelemetry (#4741)
* Remove opentelemetry

* remove unused deps, use backtrace

* always print db migration messages regardless of log level (fixes #4725)

* fix ci

* Remove useless root span builder

---------

Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
1 month ago
Dessalines ef49a0eb8d
Changing list_logins to return a ListLoginsResponse object. (#4888)
- Fixes #4873
1 month ago
Dessalines c8ad0f2d09
Remove pointless local_user_id from LocalUserVoteDisplayMode (#4890)
- Fixes #4866
1 month ago
Nutomic 234f5c2060
Remove nonstandard field `expires` from apub block activity (ref #2316) (#4542)
* Migrate apub block activity to standard `endTime` property (fixes #2316)

* Remove nonstandard apub field `expires` (ref #2316)
1 month ago
Joseph Silva ae3df4db72
Replace "post" with "comment" in comment_report_view.rs (#4989) 2 months ago
Dessalines d479bb96c6 Version 0.19.6-beta.7 2 months ago
flamingos-cant bd1b7aa6ef
Let federation modify groups (#4937)
* Don't check if group is local

* Add API test for mods modifying communities
2 months ago
Dessalines 2913cdf556 Version 0.19.6-beta.6 2 months ago
Dessalines 6b9e5ecb48 Version 0.19.6-beta.5 2 months ago
Richard Schwab 76a2c6e79b
Fix scheduled task to delete users with denied applications (#4907)
After an admin interacted with an application it can only be accepted or denied.
Denial reasons are not required by Lemmys backend, even though they're mandatory in Lemmy-UI, and therefore they are not a reliable indicator of an application being denied.
This aligns the cleanup logic  with the logic used for the unread application count.
2 months ago
Dessalines 254ef6dab3
Make site metadata fetch endpoint require auth. (#4968)
* Make site metadata fetch require auth.

* Update crates/api/src/post/get_link_metadata.rs

Co-authored-by: dullbananas <dull.bananas0@gmail.com>

---------

Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2 months ago
Richard Schwab 63a686d390
Approve applications in transaction (#4970)
* Implement tests for registration application count and list api

* Use transaction when approving applications to ensure consistent approval state
2 months ago
flamingos-cant ea18d462b0
Throw error when non-mod posts to mod-only comm (#4966) 2 months ago
phiresky 606545ccaf
fix: Run extract_opengraph_data only on first 64kB of data and if Content-Type html (#4957)
* fix: Run extract_opengraph_data only on first 64kB of data and if data is not binary.

* use mime type for determination

* chore: simplify collect function
2 months ago
Dessalines 88fbcea246 Version 0.19.6-beta.3 2 months ago
Dessalines 33fd31754a
Adding a URL max length lemmy error. (#4960)
* 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.
3 months ago
Dessalines f8c7375731
Upgrading deps. (#4955) 3 months ago
renovate[bot] c0f3dff5cf
chore(deps): update rust crate mockall to 0.13.0 (#4946)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
3 months ago
Dessalines 6c11c013b0 Version 0.19.6-beta.2 3 months ago
Dessalines 60a7829638
Adding deny unimplemented to clippy lints. (#4922)
* Adding deny unimplemented to clippy lints.

- Context: #4782

* Update crates/apub/src/fetcher/site_or_community_or_user.rs

Thanks, I like that better.

Co-authored-by: dullbananas <dull.bananas0@gmail.com>

* Update crates/apub/src/fetcher/search.rs

Co-authored-by: dullbananas <dull.bananas0@gmail.com>

* Running fmt.

* Adding debug_assert(false)

* Removing some commands.

* Format.

* Remove todo.

---------

Co-authored-by: dullbananas <dull.bananas0@gmail.com>
3 months ago
SleeplessOne1917 1ef375e5c3
Replace 3rd party once_cell crate with recently stabilized standard library API (#4919)
* Replace 3rd party once_cell crate with recently stabilized standard library API

* Bump CI rust version
3 months ago
abdel-m 2ccb46b66d
pass local user to send local notifs (#4920)
* 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>
3 months ago
Nutomic fb911679d0
Fix admin notification for new user registration (fixes #4916) (#4925) 3 months ago
John Spurlock 7321a63005
Fix instance AP outbox url (#4917)
//site_outbox to /site_outbox
3 months ago
Dessalines 9738d87f38
Add the ability to fetch a registration application by person_id. (#4913)
* Add the ability to fetch a registration application by person_id.

- Fixes #4908

* Cleaning up PR.
3 months ago
Dessalines 32b73193df
Make sure you can view your moderated deleted and removed communities. (#4912)
* 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.
3 months ago
SleeplessOne1917 db390a2f3a
Make eligible enums convertable to static strs (#4915)
* Make eligible enums convertable to static strs

* Run cargo fmt

* Remove unnecessary derives
3 months ago
Nutomic 572a42d880
Change type of concurrent sends in config (#4914) 3 months ago
Darren M 3d80ac2ebb
Fix tls pool (#4910)
* Cargo: add rustls as a dependency

* install tls provider in main

* Cargo: re-define rustls dependency
3 months ago
phiresky a08642f813
federation: parallel sending per instance (#4623)
* federation: parallel sending

* federation: some comments

* lint and set force_write true when a request fails

* inbox_urls return vec

* split inbox functions into separate file

* cleanup

* extract sending task code to separate file

* move federation concurrent config to config file

* off by one issue

* improve msg

* fix both permanent stopping of federation queues and multiple creation of the same federation queues

* fix after merge

* lint fix

* Update crates/federate/src/send.rs

Co-authored-by: dullbananas <dull.bananas0@gmail.com>

* comment about reverse ordering

* remove crashable, comment

* comment

* move comment

* run federation tests twice

* fix test run

* prettier

* fix config default

* upgrade rust to 1.78 to fix diesel cli

* fix clippy

* delay

* add debug to make localhost urls not valid in ap crate, add some debug logs

* federation tests: ensure server stop after test and random activity id

* ci fix

* add test to federate 100 events

* fix send 100 test

* different data every time so activities are distinguishable

* allow out of order receives in test

* lint

* comment about https://github.com/LemmyNet/lemmy/pull/4623#discussion_r1565437391

* move sender for clarity, add comment

* move more things to members

* update test todo comment, use same env var as worker test but default to 1

* remove else below continue

* some more cleanup

* handle todo about smooth exit

* add federate inboxes collector tests

* lint

* actor max length

* don't reset fail count if activity skipped

* fix some comments

* reuse vars

* format

* Update .woodpecker.yml

* fix recheck time

* fix inboxes tests under fast mode

* format

* make i32 and ugly casts

* clippy

---------

Co-authored-by: dullbananas <dull.bananas0@gmail.com>
3 months ago
Dessalines 073ff44676
Reverting webmention git dep to not break publish. (#4904)
- Context: #4901
3 months ago
藍+85CD 847c01f348
refactor!: use rustls instead of native-tls (#4901)
* refactor(utils): remove apub

* refactor(utils): remove apub

* refactor(utils): remove openssl

* refactor(utils): remove openssl

* Use rustls instead of native-tls.

* refactor(utils): remove apub

* refactor(utils): remove apub

* refactor(utils): remove openssl

* refactor(utils): remove openssl

* Use rustls instead of native-tls.

* Upping activitypub_federation dep

* Using git dep of webmention.

---------

Co-authored-by: Dessalines <tyhou13@gmx.com>
3 months ago
Dessalines ba044c7d98
Adding checks for higher admin and mod. (#4860)
* 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.
3 months ago
Dessalines 6ff128341c
Do pictrs transformations for proxied image urls. (#4895)
- Fixes #4893
3 months ago
Dessalines 53a226b944
Add show_nsfw override filter to GetPosts. (#4889)
- Fixes #4124
3 months ago
Dessalines 32cee9cbca
Fixing not being able to create comments on local community posts. (#4854)
* 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.
3 months ago
dullbananas 78702b59fd
Use trigger to generate apub URL in insert instead of update, and fix query planner options not being set when TLS is disabled (#4797)
* Update create.rs

* Update utils.rs

* Update utils.sql

* Update triggers.sql

* Update utils.sql

* Update create.rs

* Update create.rs

* Update create.rs

* Update create.rs

* Update create.rs

* Update create.rs

* Update create.rs

* Update create.rs

* Create up.sql

* Update up.sql

* Update triggers.sql

* Update utils.rs

* stuff

* stuff

* revert some changed files

* Revert "revert some changed files"

This reverts commit 028eabb4bd.

* revert the correct files

* partial reverts

* migration, tests, fix establish_connection

* lint

* pg_format
4 months ago
dullbananas fd58b4f809
Exponential controversy rank (#4872)
* Update utils.sql

* add migration
4 months ago