]> Untitled Git - lemmy.git/commit
First pass at adding comment trees. (#2362)
authorDessalines <dessalines@users.noreply.github.com>
Sat, 30 Jul 2022 03:55:59 +0000 (23:55 -0400)
committerGitHub <noreply@github.com>
Sat, 30 Jul 2022 03:55:59 +0000 (05:55 +0200)
commit9c3efe32e7b2ef7978b7957eac10691beb551dde
tree978a81b0d7f17d76624a43a67c59fe72ba81bc2a
parentbecb8b4f66bdacca23b0b169e07d845afcb3d204
First pass at adding comment trees. (#2362)

* First pass at adding comment trees.

- Extracted comment replies into its own table.
- Added ltree column to comment
- Added parent_id param to GetComments to fetch a tree branch
- No paging / limiting yet

* Adding child_count to comment_aggregates.

* Adding parent comment update counts

* Fix unit tests.

* Comment tree paging mostly done.

* Fix clippy

* Fix drone tests wrong postgres version.

* Fix unit tests.

* Add back in delete in unit test.

* Add postgres upgrade script.

* Fixing some PR comments.

* Move update ltree into Comment::create

* Updating based on comments.

* Fix send soft fail.
72 files changed:
.drone.yml
Cargo.lock
api_tests/package.json
api_tests/src/comment.spec.ts
api_tests/src/community.spec.ts
api_tests/src/follow.spec.ts
api_tests/src/post.spec.ts
api_tests/src/shared.ts
api_tests/src/user.spec.ts
api_tests/yarn.lock
crates/api/src/comment/like.rs
crates/api/src/comment/mark_as_read.rs [deleted file]
crates/api/src/comment/mod.rs
crates/api/src/lib.rs
crates/api/src/local_user/notifications/list_mentions.rs
crates/api/src/local_user/notifications/list_replies.rs
crates/api/src/local_user/notifications/mark_all_read.rs
crates/api/src/local_user/notifications/mark_reply_read.rs [new file with mode: 0644]
crates/api/src/local_user/notifications/mod.rs
crates/api/src/local_user/notifications/unread_count.rs
crates/api/src/site/search.rs
crates/api_common/src/comment.rs
crates/api_common/src/person.rs
crates/api_common/src/post.rs
crates/api_crud/src/comment/create.rs
crates/api_crud/src/comment/list.rs
crates/api_crud/src/post/read.rs
crates/api_crud/src/user/read.rs
crates/apub/src/mentions.rs
crates/apub/src/objects/comment.rs
crates/apub/src/protocol/objects/note.rs
crates/db_schema/Cargo.toml
crates/db_schema/src/aggregates/comment_aggregates.rs
crates/db_schema/src/aggregates/community_aggregates.rs
crates/db_schema/src/aggregates/person_aggregates.rs
crates/db_schema/src/aggregates/post_aggregates.rs
crates/db_schema/src/aggregates/site_aggregates.rs
crates/db_schema/src/aggregates/structs.rs
crates/db_schema/src/impls/comment.rs
crates/db_schema/src/impls/comment_reply.rs [new file with mode: 0644]
crates/db_schema/src/impls/mod.rs
crates/db_schema/src/impls/moderator.rs
crates/db_schema/src/impls/person_mention.rs
crates/db_schema/src/lib.rs
crates/db_schema/src/newtypes.rs
crates/db_schema/src/schema.rs
crates/db_schema/src/source/comment.rs
crates/db_schema/src/source/comment_reply.rs [new file with mode: 0644]
crates/db_schema/src/source/mod.rs
crates/db_schema/src/utils.rs
crates/db_views/Cargo.toml
crates/db_views/src/comment_report_view.rs
crates/db_views/src/comment_view.rs
crates/db_views/src/post_view.rs
crates/db_views/src/structs.rs
crates/db_views_actor/src/comment_reply_view.rs [new file with mode: 0644]
crates/db_views_actor/src/lib.rs
crates/db_views_actor/src/person_mention_view.rs
crates/db_views_actor/src/person_view.rs
crates/db_views_actor/src/structs.rs
crates/routes/src/feeds.rs
crates/websocket/src/chat_server.rs
crates/websocket/src/lib.rs
crates/websocket/src/send.rs
docker/dev/docker-compose.yml
docker/federation/docker-compose.yml
docker/prod/docker-compose.yml
migrations/2022-07-07-182650_comment_ltrees/down.sql [new file with mode: 0644]
migrations/2022-07-07-182650_comment_ltrees/up.sql [new file with mode: 0644]
scripts/postgres_12_to_14_upgrade.sh [new file with mode: 0755]
scripts/test.sh
src/api_routes.rs