diff options
author | lumi <lumi@pew.im> | 2018-05-23 23:08:57 +0200 |
---|---|---|
committer | Maxime “pep” Buquet <pep@bouah.net> | 2019-12-27 18:56:27 +0100 |
commit | 2ff48b7adf3e022e6809ce59f6429a387f0f3ffa (patch) | |
tree | 76f4e691517c621c0400b29367f177670a50c820 /poezio | |
parent | ebbdbc2cbdc6d0aeaf7c4b1ea87af5049882564a (diff) | |
download | poezio-2ff48b7adf3e022e6809ce59f6429a387f0f3ffa.tar.gz poezio-2ff48b7adf3e022e6809ce59f6429a387f0f3ffa.tar.bz2 poezio-2ff48b7adf3e022e6809ce59f6429a387f0f3ffa.tar.xz poezio-2ff48b7adf3e022e6809ce59f6429a387f0f3ffa.zip |
Expand the status command, make decryption work, put a hack into the core so I can handle messages without bodies.
Diffstat (limited to 'poezio')
-rw-r--r-- | poezio/core/core.py | 1 | ||||
-rw-r--r-- | poezio/core/handlers.py | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/poezio/core/core.py b/poezio/core/core.py index 717ee305..fe6a9d78 100644 --- a/poezio/core/core.py +++ b/poezio/core/core.py @@ -240,6 +240,7 @@ class Core: ('groupchat_subject', self.handler.on_groupchat_subject), ('http_confirm', self.handler.http_confirm), ('message', self.handler.on_message), + ('message_encryption', self.handler.on_encrypted_message), ('message_error', self.handler.on_error_message), ('message_xform', self.handler.on_data_form), ('no_auth', self.handler.on_no_auth), diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py index fc5938f3..8f2f2584 100644 --- a/poezio/core/handlers.py +++ b/poezio/core/handlers.py @@ -271,6 +271,14 @@ class HandlerCore: return self.on_normal_message(message) + def on_encrypted_message(self, message): + """ + When receiving an encrypted message + """ + if message["body"]: + return # Already being handled by on_message. + self.on_message(message) + def on_error_message(self, message): """ When receiving any message with type="error" |