diff options
author | mathieui <mathieui@mathieui.net> | 2021-07-02 20:59:25 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2021-07-02 20:59:25 +0200 |
commit | 2b3cde233fec354bf1b1894e926d67ec9ce371b8 (patch) | |
tree | 89b28567bd65a4d71715ea29096855b4b8e5ea80 /poezio/core/core.py | |
parent | 26505c32df055bfe41c3a852fff1b1eaf5dafda7 (diff) | |
download | poezio-2b3cde233fec354bf1b1894e926d67ec9ce371b8.tar.gz poezio-2b3cde233fec354bf1b1894e926d67ec9ce371b8.tar.bz2 poezio-2b3cde233fec354bf1b1894e926d67ec9ce371b8.tar.xz poezio-2b3cde233fec354bf1b1894e926d67ec9ce371b8.zip |
fix: improve typing
preliminary to more typing added to slixmpp, fix things in advance
Diffstat (limited to 'poezio/core/core.py')
-rw-r--r-- | poezio/core/core.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/poezio/core/core.py b/poezio/core/core.py index 2af292f1..81ac6e8a 100644 --- a/poezio/core/core.py +++ b/poezio/core/core.py @@ -930,14 +930,17 @@ class Core: pass supports_direct = 'jabber:x:conference' in features if supports_direct: - invite = self.xmpp.plugin['xep_0249'].send_invitation + self.xmpp.plugin['xep_0249'].send_invitation( + jid=jid, + roomjid=room, + reason=reason + ) else: # fallback - invite = self.xmpp.plugin['xep_0045'].invite - invite( - jid=jid, - room=room, - reason=reason - ) + self.xmpp.plugin['xep_0045'].invite( + jid=jid, + room=room, + reason=reason or '', + ) return True def _impromptu_room_form(self, room): @@ -1259,7 +1262,7 @@ class Core: return tab def open_new_room(self, - room: str, + room: JID, nick: str, *, password: Optional[str] = None, @@ -1773,7 +1776,7 @@ class Core: remote_bookmarks = self.bookmarks.remote() self.join_initial_rooms(remote_bookmarks) - def room_error(self, error: IqError, room_name: str) -> None: + def room_error(self, error, room_name: str) -> None: """ Display the error in the tab """ |