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/* 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 = [ diff --git a/ansible/VERSION b/ansible/VERSION index 2430a5737..1b481bb8f 100644 --- a/ansible/VERSION +++ b/ansible/VERSION @@ -1 +1 @@ -v0.8.10 +0.9.0-rc.4 diff --git a/docker/dev/docker-compose.yml b/docker/dev/docker-compose.yml index 5342f8b10..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.8.10 + 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 dc015a289..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.8.10 + 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.8.10 + 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.8.10 + 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.8.10 + 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.8.10 + 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 c3d61a64c..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.8.10 + 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.8.10 + image: dessalines/lemmy-ui:0.9.0-rc.4 ports: - "1235:1234" restart: always diff --git a/docs b/docs index 93ede3dd6..cf3236bb6 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 93ede3dd623a40f408baf70d68dd868ea5163c53 +Subproject commit cf3236bb620048897048027d8cdff34401ad85ee 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_api/src/version.rs b/lemmy_api/src/version.rs index e44da9fb9..f3a86c993 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 = "0.9.0-rc.4"; diff --git a/lemmy_db_views/src/comment_view.rs b/lemmy_db_views/src/comment_view.rs index 951e2f61b..3ee3e9384 100644 --- a/lemmy_db_views/src/comment_view.rs +++ b/lemmy_db_views/src/comment_view.rs @@ -321,7 +321,12 @@ 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(