Update the type of BasePlugin.xmpp to BaseXMPP. Increase the timeout for join_muc_wait.
This commit is contained in:
		@@ -12,7 +12,7 @@ import copy
 | 
			
		||||
import logging
 | 
			
		||||
import threading
 | 
			
		||||
 | 
			
		||||
from slixmpp.clientxmpp import ClientXMPP
 | 
			
		||||
from slixmpp.basexmpp import BaseXMPP
 | 
			
		||||
 | 
			
		||||
from typing import Any, Dict, Set, ClassVar
 | 
			
		||||
 | 
			
		||||
@@ -274,7 +274,7 @@ class BasePlugin(object):
 | 
			
		||||
    #: `plugin.config['foo']`.
 | 
			
		||||
    default_config: ClassVar[Dict[str, Any]] = {}
 | 
			
		||||
 | 
			
		||||
    def __init__(self, xmpp: ClientXMPP, config=None):
 | 
			
		||||
    def __init__(self, xmpp: BaseXMPP, config=None):
 | 
			
		||||
        self.xmpp = xmpp
 | 
			
		||||
        if self.xmpp:
 | 
			
		||||
            self.api = self.xmpp.api.wrap(self.name)
 | 
			
		||||
 
 | 
			
		||||
@@ -266,7 +266,7 @@ class XEP_0045(BasePlugin):
 | 
			
		||||
                            seconds: Optional[int] = None,
 | 
			
		||||
                            since: Optional[datetime] = None,
 | 
			
		||||
                            presence_options: Optional[PresenceArgs] = None,
 | 
			
		||||
                            timeout: int = 30) -> JoinResult:
 | 
			
		||||
                            timeout: int = 300) -> JoinResult:
 | 
			
		||||
        """
 | 
			
		||||
        Try to join a MUC and block until we are joined or get an error.
 | 
			
		||||
 | 
			
		||||
@@ -312,7 +312,7 @@ class XEP_0045(BasePlugin):
 | 
			
		||||
        stanza.send()
 | 
			
		||||
        return await self._await_join(room, timeout)
 | 
			
		||||
 | 
			
		||||
    async def _await_join(self, room: JID, timeout: int = 30) -> JoinResult:
 | 
			
		||||
    async def _await_join(self, room: JID, timeout: int = 300) -> JoinResult:
 | 
			
		||||
        """Do the heavy lifting for awaiting a MUC join
 | 
			
		||||
 | 
			
		||||
        A muc join, once the join stanza is sent, is:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user