From 8772ec6b24995a9534bb19c5ba8c76b12aadd15b Mon Sep 17 00:00:00 2001 From: Nexus2k Date: Fri, 22 Apr 2022 14:02:19 +0200 Subject: [PATCH 1/2] Fix Ack detection & bump dependencies --- .circleci/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3d9ee0a..3ad63ad 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2 jobs: helmLint: docker: - - image: web3f/ci-commons:v2.4.6 + - image: web3f/ci-commons:v3.0.0 steps: - checkout - run: @@ -11,7 +11,7 @@ jobs: helm lint ./charts/matrixbot-ack buildImage: docker: - - image: web3f/ci-commons:v2.4.6 + - image: web3f/ci-commons:v3.0.0 resource_class: xlarge steps: - checkout @@ -23,7 +23,7 @@ jobs: /scripts/build-image.sh web3f/matrixbot-ack . publishImage: docker: - - image: web3f/ci-commons:v2.4.6 + - image: web3f/ci-commons:v3.0.0 steps: - checkout - setup_remote_docker @@ -32,7 +32,7 @@ jobs: /scripts/publish-image.sh web3f/matrixbot-ack publishChart: docker: - - image: web3f/ci-commons:v2.4.6 + - image: web3f/ci-commons:v3.0.0 steps: - checkout - run: @@ -40,7 +40,7 @@ jobs: /scripts/publish-chart.sh integrationTests: docker: - - image: web3f/ci-commons:v2.4.6 + - image: web3f/ci-commons:v3.0.0 steps: - checkout - setup_remote_docker From 14675942cf4210225ca9785c37f1a833741365aa Mon Sep 17 00:00:00 2001 From: Nexus2k Date: Fri, 22 Apr 2022 14:14:37 +0200 Subject: [PATCH 2/2] Fix Ack detection --- Cargo.lock | 69 ++++++++++++++++++++------------ charts/matrixbot-ack/Chart.yaml | 2 +- charts/matrixbot-ack/values.yaml | 2 +- src/matrix.rs | 2 +- 4 files changed, 46 insertions(+), 29 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cf65ef9..75aacb3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -269,7 +269,7 @@ checksum = "495ee669413bfbe9e8cace80f4d3d78e6d8c8d99579f97fb93bde351b185f2d4" dependencies = [ "cfg-if", "cipher", - "cpufeatures", + "cpufeatures 0.1.4", "ctr", "opaque-debug", ] @@ -368,9 +368,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backoff" @@ -501,21 +501,21 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chacha20" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee7ad89dc1128635074c268ee661f90c3f7e83d9fd12910608c36b47d6c3412" +checksum = "f08493fa7707effc63254c66c6ea908675912493cd67952eda23c09fae2610b1" dependencies = [ "cfg-if", "cipher", - "cpufeatures", + "cpufeatures 0.2.2", "zeroize", ] [[package]] name = "chacha20poly1305" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1580317203210c517b6d44794abfbe600698276db18127e37ad3e69bf5e848e5" +checksum = "b6547abe025f4027edacd9edaa357aded014eecec42a5070d9b885c3c334aba2" dependencies = [ "aead", "chacha20", @@ -636,6 +636,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +dependencies = [ + "libc", +] + [[package]] name = "crc32fast" version = "1.2.1" @@ -967,6 +976,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "fs_extra" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" + [[package]] name = "futures" version = "0.3.17" @@ -1511,9 +1526,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.94" +version = "0.2.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e" +checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50" [[package]] name = "linked-hash-map" @@ -1541,10 +1556,11 @@ checksum = "84f9a2d3e27ce99ce2c3aad0b09b1a7b916293ea9b2bf624c13fe646fadd8da4" [[package]] name = "lock_api" -version = "0.4.4" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" dependencies = [ + "autocfg", "scopeguard", ] @@ -1950,11 +1966,12 @@ dependencies = [ [[package]] name = "olm-sys" -version = "1.1.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d29b3debd2916908e725d936ef5722d014a338a57c74e59dbf4c8c43855254d" +checksum = "23cbfa165db53edf2b0f351c6129e39fc5fa662ed557d5312cfeeac1509fb2af" dependencies = [ "cmake", + "fs_extra", ] [[package]] @@ -2134,7 +2151,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fe800695325da85083cd23b56826fccb2e2dc29b218e7811a6f33bc93f414be" dependencies = [ - "cpufeatures", + "cpufeatures 0.1.4", "opaque-debug", "universal-hash", ] @@ -2146,7 +2163,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e597450cbf209787f0e6de80bf3795c6b2356a380ee87837b545aded8dbc1823" dependencies = [ "cfg-if", - "cpufeatures", + "cpufeatures 0.1.4", "opaque-debug", "universal-hash", ] @@ -2558,9 +2575,9 @@ dependencies = [ [[package]] name = "ruma-events" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "338ba384badd1f4bdc924d3fc3021ebfee5d5e9d4ab8122fc86a15ac732a3e60" +checksum = "7da5f1472d60803e06744f83040a055948fd5bc1f4344d3e555ea378d0d6c96d" dependencies = [ "indoc", "js_int", @@ -2574,9 +2591,9 @@ dependencies = [ [[package]] name = "ruma-events-macros" -version = "0.23.2" +version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4d7d41acbe4833798babeb953862726952785aa5efd2164bbb69a6c65974c1e" +checksum = "85929d84b29c4ce034bd1742e13d7ca25d885831f0185b73f7f9a9094296e1c4" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.27", @@ -2633,9 +2650,9 @@ checksum = "8edeb165c4dcb8c93d1b7396b32fd5f52c5d9c7e7898ab87d772f824fe642f7c" [[package]] name = "ruma-serde" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63074bc5313acbb4145c7a98c2aa90f1a5b218926ed10d3d71c469664326a4dc" +checksum = "cd9cf55470945ce15641f331d0230bbab328cdf9aa5c3ec8aa20977b60553f15" dependencies = [ "bytes", "form_urlencoded", @@ -2648,9 +2665,9 @@ dependencies = [ [[package]] name = "ruma-serde-macros" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "025cad7b962e7fb95f9e2df20339ec8ab1c250c9fb148b201f374ce41919d32c" +checksum = "f6af6e7156da1a4b0bd4b13dbe8c5a725878595a7962345393b3f171c75bd7cc" dependencies = [ "proc-macro-crate", "proc-macro2 1.0.27", @@ -2901,7 +2918,7 @@ checksum = "8c4cfa741c5832d0ef7fab46cabed29c2aae926db0b11bb2069edd8db5e64e16" dependencies = [ "block-buffer", "cfg-if", - "cpufeatures", + "cpufeatures 0.1.4", "digest", "opaque-debug", ] @@ -2920,7 +2937,7 @@ checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" dependencies = [ "block-buffer", "cfg-if", - "cpufeatures", + "cpufeatures 0.1.4", "digest", "opaque-debug", ] diff --git a/charts/matrixbot-ack/Chart.yaml b/charts/matrixbot-ack/Chart.yaml index f1044c4..364995b 100644 --- a/charts/matrixbot-ack/Chart.yaml +++ b/charts/matrixbot-ack/Chart.yaml @@ -1,4 +1,4 @@ description: Matrixbot Ack name: matrixbot-ack -version: v0.2.6 +version: v0.2.7 apiVersion: v2 diff --git a/charts/matrixbot-ack/values.yaml b/charts/matrixbot-ack/values.yaml index e8f91c2..8e2f96c 100644 --- a/charts/matrixbot-ack/values.yaml +++ b/charts/matrixbot-ack/values.yaml @@ -2,7 +2,7 @@ environment: production image: repository: web3f/matrixbot-ack - tag: v0.2.6 + tag: v0.2.7 pullPolicy: IfNotPresent config: diff --git a/src/matrix.rs b/src/matrix.rs index 8bbe410..79809ff 100644 --- a/src/matrix.rs +++ b/src/matrix.rs @@ -287,7 +287,7 @@ impl EventHandler for Listener { "pending" => Command::Pending, "help" => Command::Help, txt @ _ => { - if txt.starts_with("ack") || txt.starts_with("acknowledge") { + if txt.to_lowercase().starts_with("ack") || txt.to_lowercase().starts_with("acknowledge") { let parts: Vec<&str> = txt.split(" ").collect(); if parts.len() == 2 { if let Ok(id) = AlertId::from_str(parts[1]) {