Commit Graph

420 Commits

Author SHA1 Message Date
dull b
f740f115e5 Revert "Fix api_common::utils"
This reverts commit 7dc73de613.
2023-07-04 02:56:54 +00:00
dull b
2ee206af7c Revert "Fix apub::activities::block"
This reverts commit 3b02389abd.
2023-07-04 02:56:30 +00:00
dull b
96ed8bf2e9 Revert "Fix apub::api::resolve_object"
This reverts commit 3e4059aabb.
2023-07-04 02:56:03 +00:00
dull b
0a8d1f8caf Revert "Fix some things"
This reverts commit 2bf8574bc8.
2023-07-04 02:54:33 +00:00
dull b
2bf8574bc8 Fix some things 2023-07-04 02:54:04 +00:00
dull b
3e4059aabb Fix apub::api::resolve_object 2023-07-04 02:18:49 +00:00
dull b
3b02389abd Fix apub::activities::block 2023-07-04 02:17:07 +00:00
dull b
7dc73de613 Fix api_common::utils 2023-07-04 02:11:01 +00:00
dull b
2c47ac35a0 fix 2023-07-03 18:19:50 +00:00
dull b
8f46003ebc Merge remote-tracking branch 'upstream/main' into db-traits-refactor 2023-07-03 18:02:53 +00:00
perillamint
696cca4ce4
Remove excessive content_type header configuration (#3470) 2023-07-03 13:43:45 -04:00
dullbananas
37bf1843c9
Merge branch 'main' into db-traits-refactor 2023-07-03 09:42:47 -07:00
Nutomic
3578dab67f
Remove PerformApub trait (#3423)
* Remove PerformApub trait

This is completely useless now that websocket is gone. In the future
I also plan to remove Perform and PerformCrud traits, but it will be
difficult to do that while still compiling crates in parallel.

* params need to use query
2023-07-03 11:01:41 +02:00
dull b
0957e2b319 Fix stuff 2023-07-01 04:11:27 +00:00
dull b
0d9db43b0a Remove more &mut * 2023-07-01 03:26:24 +00:00
dull b
5db6b556cc DbConn trait 2023-07-01 03:04:38 +00:00
dull b
6846210074 Merge remote-tracking branch 'upstream/main' into db-traits-refactor 2023-06-30 19:17:13 +00:00
dull b
cc1a725c8a Revert "Get rid of repetitive &mut *context.conn().await?"
This reverts commit d2c6263ea1.
2023-06-30 18:24:06 +00:00
dull b
c1c17ab63b Revert "Add blank lines under each line with conn ="
This reverts commit 773a6d3beb.
2023-06-30 18:23:40 +00:00
dull b
3021e2c9b8 Revert "Fix style mistakes (partial)"
This reverts commit 48a033b87f.
2023-06-30 18:23:03 +00:00
dull b
48a033b87f Fix style mistakes (partial) 2023-06-30 18:21:10 +00:00
Lemmus.org
810762762f
Update federated posts to not cache sensitive images if not allow by local site (#3253)
* Update federated posts to not cache sensitive images if not allow by local site

* Refactor thumbnail match to simplify logic
2023-06-30 12:42:42 +02:00
dull b
773a6d3beb Add blank lines under each line with conn = 2023-06-30 06:56:12 +00:00
dull b
d2c6263ea1 Get rid of repetitive &mut *context.conn().await? 2023-06-30 06:50:11 +00:00
dull b
2c479314ce merge 2023-06-30 03:58:51 +00:00
dull b
a8adf2dfb7 a lot 2023-06-30 03:41:09 +00:00
dullbananas
bef76630c5
Remove redundant calls to Iterator::collect (#3365)
* Remove redundant calls to `Iterator::collect`

* Update mentions.rs

* Add clippy lints and run fmt

* CI ran on the wrong commit again 
2023-06-28 11:19:26 +02:00
Nutomic
50efb1d519
Fetch community outbox and moderators in parallel (#3360)
This will speedup first time fetching of a remote community
2023-06-26 12:14:50 -04:00
perillamint
3d7d6b2530
Respond with Content-Type: application/activity+json (#3353)
As per ActivityPub specification, the return type should be
`application/activity+json`, not `application/json`.
2023-06-26 12:10:04 +02:00
cetra3
d7da911a48
Remove actix_rt & use standard tokio spawn (#3158)
* Remove `actix_rt` & use standard tokio spawn

* Adjust rust log back down

* Format correctly

* Update cargo lock

* Add DB settings

* Change name and update to latest rev

* Clean up formatting changes

* Move `worker_count` and `worker_retry_count` to settings

* Update defaults

* Use `0.4.4` instead of git branch
2023-06-26 10:24:11 +02:00
Nutomic
ffce66abb8
Update apub library to 0.4.4 (#3258)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-06-22 08:35:12 -04:00
Nutomic
e3eda68147
Correct error messages if user registers with taken user/email (#3093)
* Correct error messages if user registers with taken user/email (fixes #2955)

* exists
2023-06-21 05:26:07 -04:00
Sander Saarend
e23621c2cd
Calculate initial hot_rank and hot_rank_active for posts and comments from other instances (#3131)
* Calculate initial hot_rank when receiving posts and comments from other instances

* Move hot rank update logic into db_schema
2023-06-20 10:52:51 +02:00
Alex Maras
becf75d1f9
Fix Hidden communities showing in community list (#3094)
* Only show hidden communities when explicitly searching for them rather then in "all"

* dont set hidden to false when creating and updating - let DB set default

* lint

---------

Co-authored-by: Alex Maras <alexmaras@gmail.com>
2023-06-15 13:39:58 +02:00
Nutomic
b5dba17426
Update all dependencies (#3091) 2023-06-15 11:37:05 +02:00
Neshura
558035b128
Fix Issue #3075 by using None for local fields instead of Some(false) (#3088)
* Set insert and update form "local" to None

* Extra space to retrigger woodpecker

* Resolve code review request

https://github.com/LemmyNet/lemmy/pull/3088#discussion_r1229336958

* Remove extra space after None,
2023-06-14 08:34:45 -04:00
Nutomic
2423b89ced
Activitypub breaking changes for Lemmy 0.18 (#2705)
* Remove deprecated field `group.moderators`

* Drop column local_site.federation_debug

* Remove backwards compatibility code for feature/lock post

https://github.com/LemmyNet/lemmy/pull/2716

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-06-07 15:18:17 -04:00
vpzomtrrfrt
09099e7b90
Fix handling of follows addressed to single value (#2920)
* Fix handling of follows addressed to single value

* Switch to deserialize_skip_error for Follow to

* Also use deserialize_skip_error for AcceptFollow and UndoFollow

* actually import deserialize_skip_error
2023-06-06 18:33:38 -04:00
Nutomic
3565ad984a
Remove chatserver (#2919)
* Remove chatserver

* fix clippy

* Remove captchas (fixes #2922)

* fix prettier

* fix api_common build

* cargo fmt
2023-06-06 12:27:22 -04:00
Nutomic
7248c4a6f4
Filter empty username strings from Mastodon (fixes #2886) (#2887)
* Filter empty username strings from Mastodon (fixes #2886)

* add issue link
2023-06-05 13:56:53 +02:00
Nutomic
a5707328cf
Dont return error in case optional auth is invalid (#2879)
* Dont return error in case optional auth is invalid

* fixes
2023-05-25 10:50:07 -04:00
Nutomic
82d93da26b
Remove GetCommunityResponse.default_post_language (#2867)
This field is unnecessary because we already set a default language
with the same logic if none is passed in CreatePost. So if the user
doesnt set a post language, it should simply be passed as None. This
also has the advantage that it works with clients that dont support
language tags.

Technically not a breaking change because its optional, but better
be safe.
2023-05-21 11:55:32 -04:00
Felix Ableitner
436a293f38 Dont refetch post url metadata when post is received again 2023-05-18 16:34:52 +02:00
Dessalines
69f179bd33
Prettier check (#2855)
* Adding prettier check to CI.

* Running prettier on codebase.
2023-05-13 16:50:58 -04:00
Dessalines
88a0d2feec
Adding typescript generation for API. Fixes #2824 (#2827)
* Adding typescript generation for API. Fixes #2824

* Try to fix Ltree issue 1.

* Forgot a few types.

* Fixing api tests.

* Removing url_serde line.

* Manually deriving TS for some types.
2023-04-26 00:26:10 -04:00
Dessalines
1b5437cbe3
Addressing slow profile queries. #2777 (#2830)
* Addressing slow profile queries. #2777

* Addressing PR comments.
2023-04-25 19:28:06 -04:00
Nutomic
a25faf3e97
Add to field in follow activities for better compatibility (#2829)
* Add `to` field in follow activities for better compatibility (fixes #2744)

* fix tests
2023-04-24 17:19:08 -04:00
Dessalines
eb40aeb89b
Remove last Option<Vec.. from API. Fixes #2820 (#2822)
* Remove last Option<Vec.. from API. Fixes #2820

* Add empty allowed_instances check.

* Adding comment for allowed_instances.
2023-04-21 23:41:03 +02:00
Dessalines
d8722b6e91
Adding diesel enums for SortType and ListingType (#2808)
* Adding diesel enums for SortType and ListingType

- Uses diesel-derive-enum.
- Adds diesel.toml , so we can again use the auto-generated schema.rs
- Fixes a lot of DB null issues and column ordering issues.
- Fixes #1136
- Also replaces RegistrationMode boilerplate.

* Fixing unit tests 1.

* Remove comment line.

* Before patch.

* Before again.

* Using patch file to fix diesel_ltree issue with diesel.toml

* Adding some yalc ignores

* Fixing RegistrationMode enums

* Adding woodpecker diesel schema check.

* Try adding openssl 1.

* Try using diesel-cli image 1

* Try using diesel-cli image 2

* Try using diesel-cli image 3

* Try using diesel-cli image 4

* Try using diesel-cli image 5

* Try using diesel-cli image 6

* Try using diesel-cli image 7

* Try using diesel-cli image 8

* Try using diesel-cli image 9

* Try using diesel-cli image 10

* Try using diesel-cli image 11

* Try using diesel-cli image 12

* Try using diesel-cli image 13
2023-04-17 15:19:51 -04:00
Dessalines
33ba1fc623
Separate federated_instances into its own endpoint. Fixes #1931 (#2813) 2023-04-16 17:00:31 -04:00