fix: uniformize command_say signature

This commit is contained in:
mathieui 2021-03-20 21:01:09 +01:00
parent 71ee1b85aa
commit 9ab0d250f4
3 changed files with 4 additions and 4 deletions

View file

@ -808,7 +808,7 @@ class ChatTab(Tab):
self.state = 'scrolled' self.state = 'scrolled'
@command_args_parser.raw @command_args_parser.raw
def command_say(self, line, correct=False): def command_say(self, line: str, attention: bool = False, correct: bool = False):
pass pass
def goto_build_lines(self, new_date): def goto_build_lines(self, new_date):
@ -1063,7 +1063,7 @@ class OneToOneTab(ChatTab):
msg.send() msg.send()
@command_args_parser.raw @command_args_parser.raw
def command_say(self, line, correct=False, attention=False): def command_say(self, line: str, attention: bool = False, correct: bool = False):
pass pass
@command_args_parser.ignored @command_args_parser.ignored

View file

@ -104,7 +104,7 @@ class ConversationTab(OneToOneTab):
@refresh_wrapper.always @refresh_wrapper.always
@command_args_parser.raw @command_args_parser.raw
def command_say(self, line, attention=False, correct=False): def command_say(self, line: str, attention: bool = False, correct: bool = False):
msg = self.core.xmpp.make_message( msg = self.core.xmpp.make_message(
mto=self.get_dest_jid(), mto=self.get_dest_jid(),
mfrom=self.core.xmpp.boundjid mfrom=self.core.xmpp.boundjid

View file

@ -1709,7 +1709,7 @@ class MucTab(ChatTab):
return None return None
@command_args_parser.raw @command_args_parser.raw
def command_say(self, line: str, correct: bool = False) -> None: def command_say(self, line: str, attention: bool = False, correct: bool = False):
""" """
/say <message> /say <message>
Or normal input + enter Or normal input + enter