summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-01-31 19:41:40 +0100
committermathieui <mathieui@mathieui.net>2021-01-31 19:41:40 +0100
commit3c19f69c257e4e8ea0eaa9c1d73138365b906895 (patch)
tree43048d20ea2e0f16babfcb875b8f6b5a4ae3637b
parent1f97462391a18a0e45a88ec866bb6c3cc76b04a6 (diff)
parent846c42e38628749fbee9c9a23637dc316028dcb5 (diff)
downloadslixmpp-3c19f69c257e4e8ea0eaa9c1d73138365b906895.tar.gz
slixmpp-3c19f69c257e4e8ea0eaa9c1d73138365b906895.tar.bz2
slixmpp-3c19f69c257e4e8ea0eaa9c1d73138365b906895.tar.xz
slixmpp-3c19f69c257e4e8ea0eaa9c1d73138365b906895.zip
Merge branch 'join-wait-timeout-none' into 'master'
XEP-0045: make the join_muc_wait timeout parameter optional See merge request poezio/slixmpp!112
-rw-r--r--slixmpp/plugins/xep_0045/muc.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/slixmpp/plugins/xep_0045/muc.py b/slixmpp/plugins/xep_0045/muc.py
index e156ded1..ab67d4bc 100644
--- a/slixmpp/plugins/xep_0045/muc.py
+++ b/slixmpp/plugins/xep_0045/muc.py
@@ -264,7 +264,7 @@ class XEP_0045(BasePlugin):
seconds: Optional[int] = None,
since: Optional[datetime] = None,
presence_options: Optional[Dict[str, str]] = None,
- timeout: int = 30) -> Presence:
+ timeout: Optional[int] = None) -> Presence:
"""
Try to join a MUC and block until we are joined or get an error.
@@ -276,6 +276,8 @@ class XEP_0045(BasePlugin):
:param maxstanzas: Max number of stanzas to return from history.
:param seconds: Fetch history until that many seconds in the past.
:param since: Fetch history since that timestamp.
+ :param timeout: Timeout after which a TimeoutError is raised.
+ None means no timeout.
:raises: A slixmpp.exceptions.PresenceError if the MUC returns a
presence error.
:raises: An asyncio.TimeoutError if there is neither success nor