Commit graph

28 commits

Author SHA1 Message Date
251e0d3b82 Move resolving of activitypub objects to separate api endpoint (fixes #1584) 2021-08-20 12:35:50 +02:00
Dessalines
2016afc9db
User / community blocking. Fixes #426 (#1604)
* A first pass at user / community blocking. #426

* Adding unit tests for person and community block.

* Moving migration

* Fixing creator_blocked for comment queries, added tests.

* Don't let a person block themselves

* Fix post creator_blocked

* Adding creator_blocked to PersonMentionView

* Moving blocked and follows to MyUserInfo

* Rename to local_user_view

* Add moderates to MyUserInfo

* Adding BlockCommunityResponse

* Fixing name, and check_person_block

* Fixing tests.

* Using type in Blockable trait.

* Changing recipient to target, adding unfollow to block action.
2021-08-19 20:54:15 +00:00
6910e18a83 Adding ModTransferCommunity to modlog in API. Fixes #1437 2021-08-17 17:52:28 -04:00
Dessalines
d85f0d087e
Blank out extra info for deleted or removed content. Fixes #1679 (#1680) 2021-07-30 18:44:15 +00:00
Dessalines
5fe7de2bff
Adding shortname fetching for users and communities. Fixes #1662 (#1663) 2021-07-20 04:29:50 +00:00
Dessalines
f54209c451
Running clippy --fix (#1647) 2021-07-05 16:07:26 +00:00
880c51687a Merge branch 'main' into feature/mark_post_as_read 2021-04-26 10:44:19 -04:00
5b2be6f9df Add show_read_posts filter. Fixes #1561 2021-04-24 18:26:50 -04:00
ed31deab00 Creator extra search results 2021-04-23 11:54:38 -04:00
51e181c529 Don't search for communities or users when the id is included. 2021-04-23 02:30:13 -04:00
f8cd6fd445 Making more fields optional in the API.
- Fixes #1569
2021-04-23 02:30:13 -04:00
c86f5472fb Adding listing_type to search. 2021-04-23 02:13:32 -04:00
a42ac3e58a Add creator id to search. Fixes #765 2021-04-23 02:12:29 -04:00
efee2062dd
Mark accounts as bot nutomic (#1565)
* Mark account as bot. Fixes #1357

* Fix clippy

* Federate bot status using actor `type` field

* fix clippy

Co-authored-by: Dessalines <tyhou13@gmx.com>
2021-04-21 17:41:14 -04:00
65a11a7239
Use .map_err in api code (fixes #1573) (#1575)
* Use .map_err in api code (fixes #1573)

* forgot some
2021-04-16 09:10:43 -04:00
249fcc5066 Split api crate into api_structs and api 2021-03-25 20:19:40 +01:00
9cb4dad4b4 A first pass. 2021-03-10 23:43:11 -05:00
ddf4a667b1 ~80% done 2021-03-10 17:33:55 -05:00
Andrew Yoon
e78ba38e94
Use URL type in most outstanding struct fields (#1468)
* Use URL type in most outstanding struct fields

This fixes all known remaining cases where url fields are stored as
plain strings, with the exception of form fields where empty strings
are used as sentinels (see `diesel_option_overwrite_to_url`).

Tested for regressions in the federated docker setup attempting to
exercise all changed fields, including through apub federation.

Fixes #1385

* Add migration to fix blank-string post.url values to be null

This also then fixes #602

* Address review feedback

- Fixed some unwraps and err message formatting
- Bumped the `url` library to 2.2.1 to fix a bug with serde error
  messages
- Add unit tests for the two diesel option override functions
- Fix migration teardown by adding a no-op

* Rename lemmy_db_queries::Url to lemmy_db_queries::DbUrl

* fix compile error

* box PostOrComment variants
2021-03-02 12:41:48 +00:00
Dessalines
462c4a2954
Rewrite settings implementation. Fixes #1270 (#1433)
* A first attempt at using deser-hjson. Fixes #1270

* Trying to fix tests, try 1

* Trying to fix tests, try 2

* A few fixes to deser_hjson

- Removing unwrap_or_defaults, using impl functions.
- Reorganized settings

* Make clippy happy

* hjson list strings must be quoted.

* Adding support for env vars.

* Moving to structs and defaults file.

* Moving settings default and struct.
2021-03-01 17:24:11 +00:00
3bdd78f341 Rename lemmy_structs to lemmy_api_structs 2021-03-01 14:08:41 +01:00
a869a2823b Still continuing on.... 2021-02-26 08:49:58 -05:00
3141ad31de Remove categories (fixes #1429) 2021-02-25 13:22:37 +01:00
8096765f0e Fix clippy error upper_case_acronyms 2021-02-22 19:04:32 +01:00
999d9f4d6c Move routes into separate crate to speed up compilation 2021-02-09 19:34:36 +01:00
4864f80656 Fixing community search not using auth. Fixes #1411 2021-02-05 10:36:28 -05:00
Dessalines
0be9b5bddb
Add allowed and blocked instances to the federated_instances response. (#1398)
- Fixes #1315
2021-02-01 13:11:37 -05:00
3b64c58198 Move most code into crates/ subfolder 2021-01-20 16:21:27 +01:00
Renamed from lemmy_api/src/site.rs (Browse further)