From 53ededcb19fd0384e96dbe7677ced2faf0de500a Mon Sep 17 00:00:00 2001 From: Madhur Garg Date: Fri, 22 Mar 2019 17:15:02 +0530 Subject: Corrects functionality of /reconnect in all type of tabs. Fixes #3471 Corrects functionality of /reconnect in all type of tabs. Fixes #3471 Moved command_reconnect from particular tabs to core.commands. Fixes #3471 --- poezio/core/commands.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'poezio/core/commands.py') diff --git a/poezio/core/commands.py b/poezio/core/commands.py index b3ebb811..4dbb5611 100644 --- a/poezio/core/commands.py +++ b/poezio/core/commands.py @@ -509,6 +509,16 @@ class CommandCore: else: self.core.information('No bookmark to remove', 'Info') + @command_args_parser.ignored + def command_reconnect(self): + """ + /reconnect + """ + if self.core.xmpp.is_connected(): + self.core.disconnect(reconnect=True) + else: + self.core.xmpp.connect() + @command_args_parser.quoted(0, 3) def set(self, args): """ -- cgit v1.2.3