From a1e5d0fd0083cea3bb13bd2a87111e8bd1f960c5 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 12 Jan 2021 18:59:07 -0500 Subject: [PATCH 1/8] Version v0.9.0-rc.1 --- ansible/VERSION | 2 +- docker/dev/docker-compose.yml | 2 +- docker/federation/docker-compose.yml | 10 +++++----- docker/prod/docker-compose.yml | 4 ++-- docker/travis/docker_push.sh | 4 ++-- lemmy_api/src/version.rs | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ansible/VERSION b/ansible/VERSION index 2430a5737..ca490612d 100644 --- a/ansible/VERSION +++ b/ansible/VERSION @@ -1 +1 @@ -v0.8.10 +v0.9.0-rc.1 diff --git a/docker/dev/docker-compose.yml b/docker/dev/docker-compose.yml index 5342f8b10..d49ce780b 100644 --- a/docker/dev/docker-compose.yml +++ b/docker/dev/docker-compose.yml @@ -17,7 +17,7 @@ services: - iframely lemmy-ui: - image: dessalines/lemmy-ui:v0.8.10 + image: dessalines/lemmy-ui:v0.9.0-rc.1 ports: - "1235:1234" restart: always diff --git a/docker/federation/docker-compose.yml b/docker/federation/docker-compose.yml index dc015a289..b94be051f 100644 --- a/docker/federation/docker-compose.yml +++ b/docker/federation/docker-compose.yml @@ -29,7 +29,7 @@ services: - ./volumes/pictrs_alpha:/mnt lemmy-alpha-ui: - image: dessalines/lemmy-ui:v0.8.10 + image: dessalines/lemmy-ui:v0.9.0-rc.1 environment: - LEMMY_INTERNAL_HOST=lemmy-alpha:8541 - LEMMY_EXTERNAL_HOST=localhost:8541 @@ -69,7 +69,7 @@ services: - ./volumes/postgres_alpha:/var/lib/postgresql/data lemmy-beta-ui: - image: dessalines/lemmy-ui:v0.8.10 + image: dessalines/lemmy-ui:v0.9.0-rc.1 environment: - LEMMY_INTERNAL_HOST=lemmy-beta:8551 - LEMMY_EXTERNAL_HOST=localhost:8551 @@ -109,7 +109,7 @@ services: - ./volumes/postgres_beta:/var/lib/postgresql/data lemmy-gamma-ui: - image: dessalines/lemmy-ui:v0.8.10 + image: dessalines/lemmy-ui:v0.9.0-rc.1 environment: - LEMMY_INTERNAL_HOST=lemmy-gamma:8561 - LEMMY_EXTERNAL_HOST=localhost:8561 @@ -150,7 +150,7 @@ services: # An instance with only an allowlist for beta lemmy-delta-ui: - image: dessalines/lemmy-ui:v0.8.10 + image: dessalines/lemmy-ui:v0.9.0-rc.1 environment: - LEMMY_INTERNAL_HOST=lemmy-delta:8571 - LEMMY_EXTERNAL_HOST=localhost:8571 @@ -191,7 +191,7 @@ services: # An instance who has a blocklist, with lemmy-alpha blocked lemmy-epsilon-ui: - image: dessalines/lemmy-ui:v0.8.10 + image: dessalines/lemmy-ui:v0.9.0-rc.1 environment: - LEMMY_INTERNAL_HOST=lemmy-epsilon:8581 - LEMMY_EXTERNAL_HOST=localhost:8581 diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index c3d61a64c..9a294c02a 100644 --- a/docker/prod/docker-compose.yml +++ b/docker/prod/docker-compose.yml @@ -12,7 +12,7 @@ services: restart: always lemmy: - image: dessalines/lemmy:v0.8.10 + image: dessalines/lemmy:v0.9.0-rc.1 ports: - "127.0.0.1:8536:8536" restart: always @@ -26,7 +26,7 @@ services: - iframely lemmy-ui: - image: dessalines/lemmy-ui:v0.8.10 + image: dessalines/lemmy-ui:v0.9.0-rc.1 ports: - "1235:1234" restart: always diff --git a/docker/travis/docker_push.sh b/docker/travis/docker_push.sh index ba77f0264..1add77b73 100644 --- a/docker/travis/docker_push.sh +++ b/docker/travis/docker_push.sh @@ -1,5 +1,5 @@ #!/bin/sh echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin docker tag dessalines/lemmy:travis \ - dessalines/lemmy:v0.8.10 -docker push dessalines/lemmy:v0.8.10 + dessalines/lemmy:v0.9.0-rc.1 +docker push dessalines/lemmy:v0.9.0-rc.1 diff --git a/lemmy_api/src/version.rs b/lemmy_api/src/version.rs index e44da9fb9..f84a3bc6a 100644 --- a/lemmy_api/src/version.rs +++ b/lemmy_api/src/version.rs @@ -1 +1 @@ -pub const VERSION: &str = "v0.8.10"; +pub const VERSION: &str = "v0.9.0-rc.1"; From d54be4ed7fc956661f24cf03171dd82d19f9cdf6 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 12 Jan 2021 19:26:32 -0500 Subject: [PATCH 2/8] Trying autotag --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 6e0c42141..b9d68a586 100644 --- a/.drone.yml +++ b/.drone.yml @@ -78,6 +78,7 @@ steps: password: from_secret: docker_password repo: dessalines/lemmy + auto_tag: true when: ref: - refs/tags/* From eafdf3033fa46c31afced9ca7d12fe8d6f1d91e4 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 12 Jan 2021 19:29:48 -0500 Subject: [PATCH 3/8] Version v0.9.0-rc.2 --- ansible/VERSION | 2 +- docker/dev/docker-compose.yml | 2 +- docker/federation/docker-compose.yml | 10 +++++----- docker/prod/docker-compose.yml | 4 ++-- docker/travis/docker_push.sh | 4 ++-- lemmy_api/src/version.rs | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ansible/VERSION b/ansible/VERSION index ca490612d..7cc34dffb 100644 --- a/ansible/VERSION +++ b/ansible/VERSION @@ -1 +1 @@ -v0.9.0-rc.1 +v0.9.0-rc.2 diff --git a/docker/dev/docker-compose.yml b/docker/dev/docker-compose.yml index d49ce780b..8c17ce154 100644 --- a/docker/dev/docker-compose.yml +++ b/docker/dev/docker-compose.yml @@ -17,7 +17,7 @@ services: - iframely lemmy-ui: - image: dessalines/lemmy-ui:v0.9.0-rc.1 + image: dessalines/lemmy-ui:v0.9.0-rc.2 ports: - "1235:1234" restart: always diff --git a/docker/federation/docker-compose.yml b/docker/federation/docker-compose.yml index b94be051f..9c7298244 100644 --- a/docker/federation/docker-compose.yml +++ b/docker/federation/docker-compose.yml @@ -29,7 +29,7 @@ services: - ./volumes/pictrs_alpha:/mnt lemmy-alpha-ui: - image: dessalines/lemmy-ui:v0.9.0-rc.1 + image: dessalines/lemmy-ui:v0.9.0-rc.2 environment: - LEMMY_INTERNAL_HOST=lemmy-alpha:8541 - LEMMY_EXTERNAL_HOST=localhost:8541 @@ -69,7 +69,7 @@ services: - ./volumes/postgres_alpha:/var/lib/postgresql/data lemmy-beta-ui: - image: dessalines/lemmy-ui:v0.9.0-rc.1 + image: dessalines/lemmy-ui:v0.9.0-rc.2 environment: - LEMMY_INTERNAL_HOST=lemmy-beta:8551 - LEMMY_EXTERNAL_HOST=localhost:8551 @@ -109,7 +109,7 @@ services: - ./volumes/postgres_beta:/var/lib/postgresql/data lemmy-gamma-ui: - image: dessalines/lemmy-ui:v0.9.0-rc.1 + image: dessalines/lemmy-ui:v0.9.0-rc.2 environment: - LEMMY_INTERNAL_HOST=lemmy-gamma:8561 - LEMMY_EXTERNAL_HOST=localhost:8561 @@ -150,7 +150,7 @@ services: # An instance with only an allowlist for beta lemmy-delta-ui: - image: dessalines/lemmy-ui:v0.9.0-rc.1 + image: dessalines/lemmy-ui:v0.9.0-rc.2 environment: - LEMMY_INTERNAL_HOST=lemmy-delta:8571 - LEMMY_EXTERNAL_HOST=localhost:8571 @@ -191,7 +191,7 @@ services: # An instance who has a blocklist, with lemmy-alpha blocked lemmy-epsilon-ui: - image: dessalines/lemmy-ui:v0.9.0-rc.1 + image: dessalines/lemmy-ui:v0.9.0-rc.2 environment: - LEMMY_INTERNAL_HOST=lemmy-epsilon:8581 - LEMMY_EXTERNAL_HOST=localhost:8581 diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index 9a294c02a..e78721862 100644 --- a/docker/prod/docker-compose.yml +++ b/docker/prod/docker-compose.yml @@ -12,7 +12,7 @@ services: restart: always lemmy: - image: dessalines/lemmy:v0.9.0-rc.1 + image: dessalines/lemmy:v0.9.0-rc.2 ports: - "127.0.0.1:8536:8536" restart: always @@ -26,7 +26,7 @@ services: - iframely lemmy-ui: - image: dessalines/lemmy-ui:v0.9.0-rc.1 + image: dessalines/lemmy-ui:v0.9.0-rc.2 ports: - "1235:1234" restart: always diff --git a/docker/travis/docker_push.sh b/docker/travis/docker_push.sh index 1add77b73..99dd41c00 100644 --- a/docker/travis/docker_push.sh +++ b/docker/travis/docker_push.sh @@ -1,5 +1,5 @@ #!/bin/sh echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin docker tag dessalines/lemmy:travis \ - dessalines/lemmy:v0.9.0-rc.1 -docker push dessalines/lemmy:v0.9.0-rc.1 + dessalines/lemmy:v0.9.0-rc.2 +docker push dessalines/lemmy:v0.9.0-rc.2 diff --git a/lemmy_api/src/version.rs b/lemmy_api/src/version.rs index f84a3bc6a..2d2d866b4 100644 --- a/lemmy_api/src/version.rs +++ b/lemmy_api/src/version.rs @@ -1 +1 @@ -pub const VERSION: &str = "v0.9.0-rc.1"; +pub const VERSION: &str = "v0.9.0-rc.2"; From 82227846af941c79d82571e2568f48380bfdd3fd Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 13 Jan 2021 12:01:42 -0500 Subject: [PATCH 4/8] Fixing top level replies, and notifs. --- lemmy_api/src/comment.rs | 4 +++- lemmy_db_views/src/comment_view.rs | 3 ++- lemmy_websocket/src/chat_server.rs | 3 +-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lemmy_api/src/comment.rs b/lemmy_api/src/comment.rs index fbbed6d62..631addb82 100644 --- a/lemmy_api/src/comment.rs +++ b/lemmy_api/src/comment.rs @@ -152,7 +152,7 @@ impl Perform for CreateComment { comment_view.comment.read = true; } - let res = CommentResponse { + let mut res = CommentResponse { comment_view, recipient_ids, form_id: data.form_id.to_owned(), @@ -164,6 +164,8 @@ impl Perform for CreateComment { websocket_id, }); + res.recipient_ids = Vec::new(); // Necessary to avoid doubles + Ok(res) } } diff --git a/lemmy_db_views/src/comment_view.rs b/lemmy_db_views/src/comment_view.rs index 951e2f61b..a40b32635 100644 --- a/lemmy_db_views/src/comment_view.rs +++ b/lemmy_db_views/src/comment_view.rs @@ -321,7 +321,8 @@ impl<'a> CommentQueryBuilder<'a> { if let Some(recipient_id) = self.recipient_id { query = query // TODO needs lots of testing - .filter(user_alias_1::id.eq(recipient_id)) + .filter(user_alias_1::id.eq(recipient_id)) // Gets the comment replies + .or_filter(comment::parent_id.is_null().and(post::creator_id.eq(recipient_id))) // Gets the top level replies .filter(comment::deleted.eq(false)) .filter(comment::removed.eq(false)); } diff --git a/lemmy_websocket/src/chat_server.rs b/lemmy_websocket/src/chat_server.rs index cdfac6c51..7d1975cd7 100644 --- a/lemmy_websocket/src/chat_server.rs +++ b/lemmy_websocket/src/chat_server.rs @@ -335,6 +335,7 @@ impl ChatServer { // Send it to the post room let mut comment_post_sent = comment_reply_sent.clone(); + // Remove the recipients here to separate mentions / user messages from post or community comments comment_post_sent.recipient_ids = Vec::new(); self.send_post_room_message( user_operation, @@ -352,8 +353,6 @@ impl ChatServer { websocket_id, )?; - // Remove the form id here to separate mentions / user messages from post or community comments - comment_reply_sent.form_id = None; // Send it to the recipient(s) including the mentioned users for recipient_id in &comment_reply_sent.recipient_ids { self.send_user_room_message( From 4677d3d7828368a335283b1c1c11769927cd76b1 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 13 Jan 2021 12:03:26 -0500 Subject: [PATCH 5/8] Updating docs. --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 93ede3dd6..cf3236bb6 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 93ede3dd623a40f408baf70d68dd868ea5163c53 +Subproject commit cf3236bb620048897048027d8cdff34401ad85ee From 36976acb2f132223c5a0a8fb0e64c45eb7cb54d4 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 13 Jan 2021 12:04:00 -0500 Subject: [PATCH 6/8] Another notifs fix. --- lemmy_db_views/src/comment_view.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lemmy_db_views/src/comment_view.rs b/lemmy_db_views/src/comment_view.rs index a40b32635..3ee3e9384 100644 --- a/lemmy_db_views/src/comment_view.rs +++ b/lemmy_db_views/src/comment_view.rs @@ -322,7 +322,11 @@ impl<'a> CommentQueryBuilder<'a> { query = query // TODO needs lots of testing .filter(user_alias_1::id.eq(recipient_id)) // Gets the comment replies - .or_filter(comment::parent_id.is_null().and(post::creator_id.eq(recipient_id))) // Gets the top level replies + .or_filter( + comment::parent_id + .is_null() + .and(post::creator_id.eq(recipient_id)), + ) // Gets the top level replies .filter(comment::deleted.eq(false)) .filter(comment::removed.eq(false)); } From cd19a72c415d9f498643a40e9040edb5082730ac Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 13 Jan 2021 12:05:56 -0500 Subject: [PATCH 7/8] Version 0.9.0-rc.4 --- ansible/VERSION | 2 +- docker/dev/docker-compose.yml | 2 +- docker/federation/docker-compose.yml | 10 +++++----- docker/prod/docker-compose.yml | 4 ++-- docker/travis/docker_push.sh | 4 ++-- lemmy_api/src/version.rs | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ansible/VERSION b/ansible/VERSION index 7cc34dffb..1b481bb8f 100644 --- a/ansible/VERSION +++ b/ansible/VERSION @@ -1 +1 @@ -v0.9.0-rc.2 +0.9.0-rc.4 diff --git a/docker/dev/docker-compose.yml b/docker/dev/docker-compose.yml index 8c17ce154..f6d2121ba 100644 --- a/docker/dev/docker-compose.yml +++ b/docker/dev/docker-compose.yml @@ -17,7 +17,7 @@ services: - iframely lemmy-ui: - image: dessalines/lemmy-ui:v0.9.0-rc.2 + image: dessalines/lemmy-ui:0.9.0-rc.4 ports: - "1235:1234" restart: always diff --git a/docker/federation/docker-compose.yml b/docker/federation/docker-compose.yml index 9c7298244..c3fc7601f 100644 --- a/docker/federation/docker-compose.yml +++ b/docker/federation/docker-compose.yml @@ -29,7 +29,7 @@ services: - ./volumes/pictrs_alpha:/mnt lemmy-alpha-ui: - image: dessalines/lemmy-ui:v0.9.0-rc.2 + image: dessalines/lemmy-ui:0.9.0-rc.4 environment: - LEMMY_INTERNAL_HOST=lemmy-alpha:8541 - LEMMY_EXTERNAL_HOST=localhost:8541 @@ -69,7 +69,7 @@ services: - ./volumes/postgres_alpha:/var/lib/postgresql/data lemmy-beta-ui: - image: dessalines/lemmy-ui:v0.9.0-rc.2 + image: dessalines/lemmy-ui:0.9.0-rc.4 environment: - LEMMY_INTERNAL_HOST=lemmy-beta:8551 - LEMMY_EXTERNAL_HOST=localhost:8551 @@ -109,7 +109,7 @@ services: - ./volumes/postgres_beta:/var/lib/postgresql/data lemmy-gamma-ui: - image: dessalines/lemmy-ui:v0.9.0-rc.2 + image: dessalines/lemmy-ui:0.9.0-rc.4 environment: - LEMMY_INTERNAL_HOST=lemmy-gamma:8561 - LEMMY_EXTERNAL_HOST=localhost:8561 @@ -150,7 +150,7 @@ services: # An instance with only an allowlist for beta lemmy-delta-ui: - image: dessalines/lemmy-ui:v0.9.0-rc.2 + image: dessalines/lemmy-ui:0.9.0-rc.4 environment: - LEMMY_INTERNAL_HOST=lemmy-delta:8571 - LEMMY_EXTERNAL_HOST=localhost:8571 @@ -191,7 +191,7 @@ services: # An instance who has a blocklist, with lemmy-alpha blocked lemmy-epsilon-ui: - image: dessalines/lemmy-ui:v0.9.0-rc.2 + image: dessalines/lemmy-ui:0.9.0-rc.4 environment: - LEMMY_INTERNAL_HOST=lemmy-epsilon:8581 - LEMMY_EXTERNAL_HOST=localhost:8581 diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index e78721862..fcc959f4f 100644 --- a/docker/prod/docker-compose.yml +++ b/docker/prod/docker-compose.yml @@ -12,7 +12,7 @@ services: restart: always lemmy: - image: dessalines/lemmy:v0.9.0-rc.2 + image: dessalines/lemmy:0.9.0-rc.4 ports: - "127.0.0.1:8536:8536" restart: always @@ -26,7 +26,7 @@ services: - iframely lemmy-ui: - image: dessalines/lemmy-ui:v0.9.0-rc.2 + image: dessalines/lemmy-ui:0.9.0-rc.4 ports: - "1235:1234" restart: always diff --git a/docker/travis/docker_push.sh b/docker/travis/docker_push.sh index 99dd41c00..25223402b 100644 --- a/docker/travis/docker_push.sh +++ b/docker/travis/docker_push.sh @@ -1,5 +1,5 @@ #!/bin/sh echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin docker tag dessalines/lemmy:travis \ - dessalines/lemmy:v0.9.0-rc.2 -docker push dessalines/lemmy:v0.9.0-rc.2 + dessalines/lemmy:0.9.0-rc.4 +docker push dessalines/lemmy:0.9.0-rc.4 diff --git a/lemmy_api/src/version.rs b/lemmy_api/src/version.rs index 2d2d866b4..f3a86c993 100644 --- a/lemmy_api/src/version.rs +++ b/lemmy_api/src/version.rs @@ -1 +1 @@ -pub const VERSION: &str = "v0.9.0-rc.2"; +pub const VERSION: &str = "0.9.0-rc.4"; From a10974ed6e2a5de9fff0e58bb9d0fe15391a7966 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Wed, 13 Jan 2021 18:10:21 +0100 Subject: [PATCH 8/8] Set debug=0 in cargo.toml to speed up builds --- Cargo.toml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ca2d291c3..6a60aa211 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,8 +3,11 @@ name = "lemmy_server" version = "0.0.1" edition = "2018" -#[profile.release] -#lto = true +[profile.dev] +debug = 0 + +[profile.release] +lto = true [workspace] members = [