]> Untitled Git - lemmy.git/commit
User / community blocking. Fixes #426 (#1604)
authorDessalines <dessalines@users.noreply.github.com>
Thu, 19 Aug 2021 20:54:15 +0000 (16:54 -0400)
committerGitHub <noreply@github.com>
Thu, 19 Aug 2021 20:54:15 +0000 (20:54 +0000)
commit2016afc9dbdd305364bf2e70270682ad5bfdc82d
tree2c4134c60e823a741d2a1f7142149fe551863e74
parent6af75492a94606a5c8e771e6150c095352532ee9
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.
41 files changed:
api_tests/package.json
api_tests/src/comment.spec.ts
api_tests/src/follow.spec.ts
api_tests/src/shared.ts
api_tests/src/user.spec.ts
api_tests/yarn.lock
crates/api/src/comment.rs
crates/api/src/community.rs
crates/api/src/lib.rs
crates/api/src/local_user.rs
crates/api/src/post.rs
crates/api/src/site.rs
crates/api_common/src/community.rs
crates/api_common/src/lib.rs
crates/api_common/src/person.rs
crates/api_common/src/site.rs
crates/api_crud/src/comment/create.rs
crates/api_crud/src/comment/update.rs
crates/api_crud/src/private_message/create.rs
crates/api_crud/src/site/read.rs
crates/api_crud/src/user/read.rs
crates/db_queries/src/lib.rs
crates/db_queries/src/source/community_block.rs [new file with mode: 0644]
crates/db_queries/src/source/mod.rs
crates/db_queries/src/source/person_block.rs [new file with mode: 0644]
crates/db_schema/src/lib.rs
crates/db_schema/src/schema.rs
crates/db_schema/src/source/community_block.rs [new file with mode: 0644]
crates/db_schema/src/source/mod.rs
crates/db_schema/src/source/person_block.rs [new file with mode: 0644]
crates/db_views/src/comment_view.rs
crates/db_views/src/post_view.rs
crates/db_views_actor/src/community_block_view.rs [new file with mode: 0644]
crates/db_views_actor/src/community_view.rs
crates/db_views_actor/src/lib.rs
crates/db_views_actor/src/person_block_view.rs [new file with mode: 0644]
crates/db_views_actor/src/person_mention_view.rs
crates/websocket/src/lib.rs
migrations/2021-08-04-223559_create_user_community_block/down.sql [new file with mode: 0644]
migrations/2021-08-04-223559_create_user_community_block/up.sql [new file with mode: 0644]
src/api_routes.rs