From be5df8658be86dde187cc43d682666dd33364fb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Thu, 10 Mar 2022 14:39:13 +0100 Subject: [PATCH] echo_bot: Remove chain_length command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- ChangeLog | 2 +- examples/echo_client.py | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7366af8..04a4b39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,7 +6,7 @@ Version XXX: * Added: - Heartbeat messages. Signal other devices we're still active after some amount of messages. Stop raising exceptions when there is no payload. - - Commands to echo_bot. (verbose, error, chain_length) + - Commands to echo_bot. (verbose, error) Version 0.5.0: 2021-07-12 Maxime “pep” Buquet * Added: diff --git a/examples/echo_client.py b/examples/echo_client.py index f7d8dd6..b91f0f3 100644 --- a/examples/echo_client.py +++ b/examples/echo_client.py @@ -90,8 +90,6 @@ class EchoBot(ClientXMPP): await self.cmd_verbose(mto, mtype) elif cmd == 'error': await self.cmd_error(mto, mtype) - elif cmd == 'chain_length': - await self.cmd_chain_length(mto, mtype) return None @@ -114,15 +112,6 @@ class EchoBot(ClientXMPP): body = '''Debug level set to 'error'.''' return await self.encrypted_reply(mto, mtype, body) - async def cmd_chain_length(self, mto: JID, mtype: str) -> None: - chain_length = await self['xep_0384']._chain_lengths(mto) - should_heartbeat = await self['xep_0384'].should_heartbeat(mto) - body = ( - 'lengths: %r\n' % chain_length + - 'should heartbeat: %r' % should_heartbeat - ) - return await self.encrypted_reply(mto, mtype, body) - def message_handler(self, msg: Message) -> None: asyncio.ensure_future(self.message(msg))