Commit Graph

1306 Commits (e3fef895a1ae1b481b899809f4638896fb13a7a8)

Author SHA1 Message Date
phiresky e3fef895a1 add debug to make localhost urls not valid in ap crate, add some debug logs 2024-06-25 17:13:44 +02:00
phiresky 2e2345e6f7 Merge remote-tracking branch 'origin/main' into federation-send-parallel 2024-06-24 16:35:57 +02:00
Dessalines d09854a722
Adding a show_read override to GetPosts. (#4846)
* 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>
2024-06-21 17:39:40 -04:00
dullbananas 36e6f7ec78
Fix order in `CommunityModeratorView::get_community_first_mods` (#4859)
* Fix order in `CommunityModeratorView::get_community_first_mods`

* Update community_moderator_view.rs

* Update community_moderator_view.rs
2024-06-21 13:44:55 -04:00
Dessalines 6d8d23130d
Adding an image_details table to store image dimensions. (#4704)
* 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>
2024-06-20 12:44:06 +02:00
Dessalines 9cf6da1b9e Version 0.19.5 2024-06-19 08:17:45 -04:00
Dessalines 63a824a2ed
Fixing TLS connection by installing provider. (#4844)
- Fixes #4795
2024-06-18 09:59:24 -04:00
Dessalines bfefdfd15d Version 0.19.5-alpha.2 2024-06-17 20:26:44 -04:00
dullbananas 42a6d8ab0f
Fix not-equals check in post aggregates update trigger (#4837)
* Fix not-equals check in post aggregates update trigger

Should fix #4836

* Create up.sql

* Create down.sql

* Update down.sql
2024-06-17 15:25:54 -04:00
Dessalines 5cc798a146 Version 0.19.5-alpha.1 2024-06-15 15:12:10 -04:00
dullbananas 6497ec519e
Refactor LocalUser settings conditions in database views (#4746)
* Create viewer.rs

* Rename viewer.rs to viewer.rs

* Update viewer.rs

* Update post_view.rs

* Update distinguish.rs

* Update like.rs

* Update viewer.rs

* Update list_comment_likes.rs

* Update like.rs

* Update save.rs

* Update like.rs

* revert changes in api crate

* Update post_view.rs

* Update post_view.rs

* Update comment_view.rs

* Update post_view.rs

* Update community_view.rs

* Update comment_view.rs

* Update post_view.rs

* Update viewer.rs

* Update post_view.rs

* Update community_view.rs

* Update local_user_view.rs

* Update viewer.rs

* Update community_view.rs

* Update viewer.rs

* Update lib.rs

* Update comment_view.rs

* Update post_view.rs

* Update viewer.rs

* Update viewer.rs

* Update viewer.rs

* Update viewer.rs

* Update local_user_view.rs

* Update viewer.rs

* Update viewer.rs

* Update local_user_view.rs

* Update community_view.rs

* Update viewer.rs

* Update crates/db_schema/src/viewer.rs

Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>

* Update viewer.rs

* Update viewer.rs

* Update viewer.rs

* Update viewer.rs

* Update post_view.rs

* Update community_view.rs

* Update comment_view.rs

* Update viewer.rs

* Update post_view.rs

* Update save.rs

* Update resolve_object.rs

* Update viewer.rs

* Update save.rs

* Update resolve_object.rs

* Update comment_view.rs

* Update post_view.rs

* Update community_view.rs

* Update local_user_view.rs

* Update post_view.rs

* Update viewer.rs

* Update comment_view.rs

* Update post_view.rs

* Update community_view.rs

* Update viewer.rs

* Update viewer.rs

* Update viewer.rs

* Update viewer.rs

* Update viewer.rs

* Some additions to localuser DB view helpers. (#39)

* Some additions to localuser DB view helpers.

- Getting rid of generics.
- Passing in only LocalUser to views.

* Formatting fixes.

* Getting rid of unecessary as_refs

* Fixing clippy.

---------

Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Dessalines <tyhou13@gmx.com>
2024-06-14 21:51:24 -04:00
Nutomic a3c8761bed
Revert "Remove unneeded error "last successful id is higher than latest id" (fixes #4363) (#4486)" (#4806)
This reverts commit c895e57086.
2024-06-14 08:15:12 -04:00
dullbananas 99160228ae
Remove `unimplemented` in `<Comment as Crud>::create` (#4796)
* Remove `unimplemented` in `<Comment as Crud>::create`

* Update comment.rs
2024-06-14 10:40:57 +02:00
Dessalines fc6f46c1ac
Fix issue with GetPost not returning bot cross_posts. (#4804)
- Fixes #4803
2024-06-13 14:32:03 -04:00
dullbananas 046375171e
Don't change encoding style in `clean_url_params` (#4802)
* Don't change encoding style in `clean_url_params`

Fixes #4801

* fmt

* fix
2024-06-12 20:35:27 -04:00
dullbananas b559e0206b
Replace wav with hound (#4788)
* Update lib.rs

* Update Cargo.toml

* Update lib.rs

* cargo.lock

* fix simultaneous mutable references
2024-06-07 10:27:49 -04:00
dullbananas 1e11faf741
Improve comment in triggers.sql (#4789)
* Clarified existing info
* Added prohibition of inconsistent update order
2024-06-07 07:42:34 -04:00
Dessalines 3d25322089 Version 0.19.4-rc.9 2024-06-06 10:43:40 -04:00
Dessalines 16a82862b8
Allow empty string to clear URL-type DB fields. (#4780)
* 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>
2024-06-06 09:55:08 -04:00
dullbananas 79e6dbf0de
Remove PersonInsertForm builder (#4779)
* Update session_middleware.rs

* Update private_message_report_view.rs

* Update session_middleware.rs

* Update private_message_view.rs

* Update private_message.rs

* Update registration_application_view.rs

* Update actor_language.rs

* Update vote_view.rs

* Update code_migrations.rs

* Update comment_aggregates.rs

* Update person_view.rs

* Update user_settings_backup.rs

* Update person.rs

* Update create.rs

* Update comment_view.rs

* Update moderator.rs

* Update site_aggregates.rs

* Update claims.rs

* Update community_aggregates.rs

* Update post_report.rs

* Update person_mention_view.rs

* Update community_view.rs

* Update comment_report_view.rs

* Update post_report_view.rs

* Update community_moderators.rs

* Update comment.rs

* Update person_aggregates.rs

* Update comment_reply_view.rs

* Update password_reset_request.rs

* Update post_aggregates.rs

* Update community.rs

* Update main.rs

* Update post.rs

* Update person.rs

* Update person.rs

* Update claims.rs

* Update person.rs

* Update create.rs

* Update user_settings_backup.rs

* Update community_moderators.rs

* Update main.rs

* Update comment_aggregates.rs

* Update community_aggregates.rs

* Update person.rs

* Update Cargo.toml

* Update Cargo.toml

* Update person.rs

* fix

* Update code_migrations.rs

* fix submodule

* Update person.rs
2024-06-06 08:29:18 -04:00
Dessalines e8cfb5665f
When banning from local communities, make sure they aren't deleted or removed. (#4784)
- This is causing some federation issues.
- Context: #4782
2024-06-05 18:59:46 -04:00
Dessalines 92214a9364 Version 0.19.4-rc.7 2024-06-05 17:30:43 -04:00
Dessalines 8bf17946bd
Fix issue with avatar / icon deletion when saving settings. (#4774)
* Fix issue with avatar / icon deletion when saving settings.

- Fixes #4763

* Update crates/api_common/src/request.rs

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

* Fixing an existing test, and adding another for replace images.

---------

Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2024-06-04 08:28:22 -04:00
phiresky 2dd7b71590
Merge branch 'main' into federation-send-parallel 2024-06-04 02:07:22 +02:00
Dessalines aefb41b551
Remove .json from nodeinfo urls, according to spec. (#4773) 2024-06-03 17:30:16 -04:00
Dessalines 4195a9b5a1
Fetch nodeinfo href from .well-known/nodeinfo . Fixes #4757 (#4765)
* Fetch nodeinfo href from .well-known/nodeinfo . Fixes #4757

* Addressing PR comments.

* Fixing clippy.

* Adding tests.
2024-06-03 17:30:00 -04:00
Dessalines 69b4c6647b Version 0.19.4-rc.5 2024-06-01 13:30:00 -04:00
Dessalines 6a6c915014
Changing NodeInfo metadata to HashMap from vector. Fixes #4762 (#4764) 2024-05-31 16:38:46 -04:00
phiresky 101901b8e0 fix clippy 2024-05-31 13:34:41 +02:00
phiresky 7ee63f4da8 run federation tests twice 2024-05-31 11:12:53 +02:00
phiresky 5538794d7c move comment 2024-05-30 14:40:58 +02:00
phiresky 9d87921ebb comment 2024-05-30 13:24:13 +02:00
phiresky 2acdc78d81 remove crashable, comment 2024-05-30 13:21:26 +02:00
phiresky 175133f0cd comment about reverse ordering 2024-05-30 13:02:19 +02:00
phiresky cdff275803
Update crates/federate/src/send.rs
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2024-05-30 12:44:35 +02:00
phiresky a0b0a7a0d9 lint fix 2024-05-30 12:38:17 +02:00
phiresky ffb99cd036 Merge remote-tracking branch 'origin/main' into federation-send-parallel 2024-05-30 12:26:55 +02:00
phiresky 10d3b7d698 fix after merge 2024-05-30 12:23:37 +02:00
phiresky e8a7bb07a3
fix both permanent stopping of federation queues and multiple creation of the same federation queues (#4754)
Co-authored-by: Nutomic <me@nutomic.com>
2024-05-30 05:08:27 -04:00
Richard Schwab 91e57ff954
Prevent bot replies from increasing unread reply count when bot accounts are not shown (#4747)
* 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
2024-05-29 17:55:15 -04:00
phiresky 7d80a3c7d6
replace instanceid with domain (#4753) 2024-05-29 23:10:25 +02:00
Dessalines abcfa266af
Fixing slowness in saved post fetching. #4756 (#4758)
* Fixing slowness in saved post fetching. #4756

* Also fix comment_view.rs
2024-05-29 17:03:42 -04:00
phiresky 7cb4e8222c Merge branch 'fix-dupe-activity-sending' into federation-send-parallel 2024-05-29 15:38:53 +02:00
phiresky 13ff059f83 fix both permanent stopping of federation queues and multiple creation of the same federation queues 2024-05-29 15:16:54 +02:00
Dessalines fd6a1283a5 Version 0.19.4-rc.3 2024-05-27 09:37:58 -04:00
Nutomic af034f3b5e
Unit tests and cleanup for outgoing federation code (#4733)
* 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
2024-05-27 09:34:58 -04:00
Dessalines 0d5db29bc9
After creating a comment, update the unread comments for the post. (#4742)
* 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>
2024-05-27 12:55:44 +02:00
dullbananas ec77c00ef8
Fix lost separation caused by comment width change (#4739)
* Update post_view.rs

* Update structs.rs

* Update worker.rs

* Update worker.rs
2024-05-23 14:05:35 -04:00
Dessalines 6a6108ac55
Fixing proxied images for federated posts. (#4737)
* Fixing proxied images for federated posts.

- Also added test.
- Fixes #4736

* Address PR comments.
2024-05-23 11:11:25 -04:00
Nutomic b2c1a14234
Correct url for nodeinfo version (#4734)
* Correct url for nodeinfo version

* add compat redirect

---------

Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
2024-05-23 10:59:56 -04:00