diff --git a/ica-rs/Cargo.toml b/ica-rs/Cargo.toml index 84e1752..bc60efc 100644 --- a/ica-rs/Cargo.toml +++ b/ica-rs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ica-rs" -version = "0.4.4" +version = "0.4.5" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/ica-rs/ica_typing.py b/ica-rs/ica_typing.py index fdc5318..b732c71 100644 --- a/ica-rs/ica_typing.py +++ b/ica-rs/ica_typing.py @@ -55,6 +55,9 @@ class NewMessage: @property def is_from_self(self) -> bool: ... + @property + def is_reply(self) -> bool: + ... class IcaClient: diff --git a/ica-rs/plugins/bmcl.py b/ica-rs/plugins/bmcl.py index 24d86ee..0f2cf8e 100644 --- a/ica-rs/plugins/bmcl.py +++ b/ica-rs/plugins/bmcl.py @@ -81,6 +81,6 @@ def bmcl(msg: NewMessage, client: IcaClient) -> None: def on_message(msg: NewMessage, client: IcaClient) -> None: - if not msg.is_from_self: - if msg.content == "/bmcl-rs": + if not (msg.is_from_self or msg.is_reply): + if msg.content == "/bmcl": bmcl(msg, client) diff --git a/ica-rs/src/py/class.rs b/ica-rs/src/py/class.rs index bba8664..09f5095 100644 --- a/ica-rs/src/py/class.rs +++ b/ica-rs/src/py/class.rs @@ -139,6 +139,10 @@ impl NewMessagePy { pub fn get_is_from_self(&self) -> bool { self.msg.is_from_self() } + #[getter] + pub fn get_is_reply(&self) -> bool { + self.msg.is_reply() + } } impl NewMessagePy {