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.
* 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
* 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.
* 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>
* 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.
* Adding a show_read override to GetPosts.
- If show_read is true, it overrides the local user show_read
setting.
- Fixes#4124
* Addressing PR comments.
* Update crates/db_views/src/post_view.rs
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
* Fixing formatting.
---------
Co-authored-by: dullbananas <dull.bananas0@gmail.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.
* 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>
* 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>
* Prevent bot replies from increasing unread reply count when bot accounts are not shown
* Pass LocalUser for unread replies count query
* Prevent bot mentions from increasing unread reply count when bot accounts are not shown
* test setup
* code cleanup
* cleanup
* move stats to own file
* basic test working
* cleanup
* processes test
* more test cases
* fmt
* add file
* add assert
* error handling
* fmt
* use instance id instead of domain for stats channel
* 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>
* Dont show replies / mentions from blocked users. Fixes#4227
* Adding unit tests for reply and mention views.
- Also cleaned up some unwraps in the tests.
* Add allow deprecated to pass clippy for deprecated wav crate.
---------
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>
* Mark database fields as sensitive so they dont show up in logs
* add file
* fix test
* Update crates/apub/src/objects/person.rs
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
* Update crates/apub/src/objects/community.rs
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
* Update crates/apub/src/objects/instance.rs
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
---------
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>