Merge branch 'main' into comment_create_transaction

comment_create_transaction
Dessalines 6 months ago committed by GitHub
commit 7bd803a090
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

24
Cargo.lock generated

@ -2523,7 +2523,7 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "lemmy_api"
version = "0.19.0-rc.15"
version = "0.19.0-rc.16"
dependencies = [
"activitypub_federation",
"actix-web",
@ -2551,7 +2551,7 @@ dependencies = [
[[package]]
name = "lemmy_api_common"
version = "0.19.0-rc.15"
version = "0.19.0-rc.16"
dependencies = [
"activitypub_federation",
"actix-web",
@ -2585,7 +2585,7 @@ dependencies = [
[[package]]
name = "lemmy_api_crud"
version = "0.19.0-rc.15"
version = "0.19.0-rc.16"
dependencies = [
"activitypub_federation",
"actix-web",
@ -2607,7 +2607,7 @@ dependencies = [
[[package]]
name = "lemmy_apub"
version = "0.19.0-rc.15"
version = "0.19.0-rc.16"
dependencies = [
"activitypub_federation",
"actix-web",
@ -2646,7 +2646,7 @@ dependencies = [
[[package]]
name = "lemmy_db_schema"
version = "0.19.0-rc.15"
version = "0.19.0-rc.16"
dependencies = [
"activitypub_federation",
"async-trait",
@ -2682,7 +2682,7 @@ dependencies = [
[[package]]
name = "lemmy_db_views"
version = "0.19.0-rc.15"
version = "0.19.0-rc.16"
dependencies = [
"actix-web",
"chrono",
@ -2701,7 +2701,7 @@ dependencies = [
[[package]]
name = "lemmy_db_views_actor"
version = "0.19.0-rc.15"
version = "0.19.0-rc.16"
dependencies = [
"chrono",
"diesel",
@ -2718,7 +2718,7 @@ dependencies = [
[[package]]
name = "lemmy_db_views_moderator"
version = "0.19.0-rc.15"
version = "0.19.0-rc.16"
dependencies = [
"diesel",
"diesel-async",
@ -2730,7 +2730,7 @@ dependencies = [
[[package]]
name = "lemmy_federate"
version = "0.19.0-rc.15"
version = "0.19.0-rc.16"
dependencies = [
"activitypub_federation",
"anyhow",
@ -2753,7 +2753,7 @@ dependencies = [
[[package]]
name = "lemmy_routes"
version = "0.19.0-rc.15"
version = "0.19.0-rc.16"
dependencies = [
"activitypub_federation",
"actix-web",
@ -2777,7 +2777,7 @@ dependencies = [
[[package]]
name = "lemmy_server"
version = "0.19.0-rc.15"
version = "0.19.0-rc.16"
dependencies = [
"activitypub_federation",
"actix-cors",
@ -2819,7 +2819,7 @@ dependencies = [
[[package]]
name = "lemmy_utils"
version = "0.19.0-rc.15"
version = "0.19.0-rc.16"
dependencies = [
"actix-web",
"anyhow",

@ -1,5 +1,5 @@
[workspace.package]
version = "0.19.0-rc.15"
version = "0.19.0-rc.16"
edition = "2021"
description = "A link aggregator for the fediverse"
license = "AGPL-3.0"
@ -84,16 +84,16 @@ unused_self = "deny"
unwrap_used = "deny"
[workspace.dependencies]
lemmy_api = { version = "=0.19.0-rc.15", path = "./crates/api" }
lemmy_api_crud = { version = "=0.19.0-rc.15", path = "./crates/api_crud" }
lemmy_apub = { version = "=0.19.0-rc.15", path = "./crates/apub" }
lemmy_utils = { version = "=0.19.0-rc.15", path = "./crates/utils" }
lemmy_db_schema = { version = "=0.19.0-rc.15", path = "./crates/db_schema" }
lemmy_api_common = { version = "=0.19.0-rc.15", path = "./crates/api_common" }
lemmy_routes = { version = "=0.19.0-rc.15", path = "./crates/routes" }
lemmy_db_views = { version = "=0.19.0-rc.15", path = "./crates/db_views" }
lemmy_db_views_actor = { version = "=0.19.0-rc.15", path = "./crates/db_views_actor" }
lemmy_db_views_moderator = { version = "=0.19.0-rc.15", path = "./crates/db_views_moderator" }
lemmy_api = { version = "=0.19.0-rc.16", path = "./crates/api" }
lemmy_api_crud = { version = "=0.19.0-rc.16", path = "./crates/api_crud" }
lemmy_apub = { version = "=0.19.0-rc.16", path = "./crates/apub" }
lemmy_utils = { version = "=0.19.0-rc.16", path = "./crates/utils" }
lemmy_db_schema = { version = "=0.19.0-rc.16", path = "./crates/db_schema" }
lemmy_api_common = { version = "=0.19.0-rc.16", path = "./crates/api_common" }
lemmy_routes = { version = "=0.19.0-rc.16", path = "./crates/routes" }
lemmy_db_views = { version = "=0.19.0-rc.16", path = "./crates/db_views" }
lemmy_db_views_actor = { version = "=0.19.0-rc.16", path = "./crates/db_views_actor" }
lemmy_db_views_moderator = { version = "=0.19.0-rc.16", path = "./crates/db_views_moderator" }
activitypub_federation = { version = "0.5.0-beta.6", default-features = false, features = [
"actix-web",
] }
@ -164,7 +164,7 @@ lemmy_utils = { workspace = true }
lemmy_db_schema = { workspace = true }
lemmy_api_common = { workspace = true }
lemmy_routes = { workspace = true }
lemmy_federate = { version = "0.19.0-rc.15", path = "crates/federate" }
lemmy_federate = { version = "0.19.0-rc.16", path = "crates/federate" }
activitypub_federation = { workspace = true }
diesel = { workspace = true }
diesel-async = { workspace = true }

@ -344,17 +344,26 @@ test("Federated comment like", async () => {
test("Reply to a comment from another instance, get notification", async () => {
await alpha.markAllAsRead();
let betaCommunity = (await resolveBetaCommunity(alpha)).community;
let betaCommunity = (
await waitUntil(
() => resolveBetaCommunity(alpha),
c => !!c.community?.community.instance_id,
)
).community;
if (!betaCommunity) {
throw "Missing beta community";
}
const postOnAlphaRes = await createPost(alpha, betaCommunity.community.id);
// Create a root-level trunk-branch comment on alpha
let commentRes = await createComment(alpha, postOnAlphaRes.post_view.post.id);
// find that comment id on beta
let betaComment = (
await resolveComment(beta, commentRes.comment_view.comment)
await waitUntil(
() => resolveComment(beta, commentRes.comment_view.comment),
c => c.comment?.counts.score === 1,
)
).comment;
if (!betaComment) {
@ -405,7 +414,10 @@ test("Reply to a comment from another instance, get notification", async () => {
expect(alphaUnreadCountRes.replies).toBeGreaterThanOrEqual(1);
// check inbox of replies on alpha, fetching read/unread both
let alphaRepliesRes = await getReplies(alpha);
let alphaRepliesRes = await waitUntil(
() => getReplies(alpha),
r => r.replies.length > 0,
);
const alphaReply = alphaRepliesRes.replies.find(
r => r.comment.id === alphaComment.comment.id,
);

@ -7,9 +7,12 @@ CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
cd $CWD/../
find migrations -type f -name "*.sql" -print0 | while read -d $'\0' FILE
do
TMP_FILE="/tmp/tmp_pg_format.sql"
pg_format $FILE > $TMP_FILE
diff -u $FILE $TMP_FILE
done
# Copy the files to a temp dir
TMP_DIR=$(mktemp -d)
cp -a migrations/. $TMP_DIR
# Format the new files
find $TMP_DIR -type f -name '*.sql' -exec pg_format -i {} +
# Diff the directories
diff -r migrations $TMP_DIR

Loading…
Cancel
Save