parent
b548b90a6c
commit
c63e32634a
2 changed files with 10 additions and 1 deletions
|
@ -26,7 +26,10 @@ from gajim.common.types import ConnectionT
|
||||||
|
|
||||||
log = logging.getLogger('gajim.c.m')
|
log = logging.getLogger('gajim.c.m')
|
||||||
|
|
||||||
ZEROCONF_MODULES = ['adhoc_commands', 'receipts', 'discovery']
|
ZEROCONF_MODULES = ['adhoc_commands',
|
||||||
|
'receipts',
|
||||||
|
'discovery',
|
||||||
|
'chatstates']
|
||||||
|
|
||||||
_imported_modules = [] # type: List[tuple]
|
_imported_modules = [] # type: List[tuple]
|
||||||
_modules = {} # type: Dict[str, Dict[str, Any]]
|
_modules = {} # type: Dict[str, Dict[str, Any]]
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from unittest.mock import Mock
|
||||||
|
|
||||||
from gajim.common import app
|
from gajim.common import app
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
from nbxmpp.idlequeue import IdleObject
|
from nbxmpp.idlequeue import IdleObject
|
||||||
|
@ -141,6 +143,7 @@ class P2PClient(IdleObject):
|
||||||
self.Namespace = 'jabber:client'
|
self.Namespace = 'jabber:client'
|
||||||
self.protocol_type = 'XMPP'
|
self.protocol_type = 'XMPP'
|
||||||
self.defaultNamespace = self.Namespace
|
self.defaultNamespace = self.Namespace
|
||||||
|
self.Smacks = Mock()
|
||||||
self._component = 0
|
self._component = 0
|
||||||
self._registered_name = None
|
self._registered_name = None
|
||||||
self._caller = conn_holder.caller
|
self._caller = conn_holder.caller
|
||||||
|
@ -190,6 +193,9 @@ class P2PClient(IdleObject):
|
||||||
|
|
||||||
self.on_responses = {}
|
self.on_responses = {}
|
||||||
|
|
||||||
|
def get_bound_jid(self):
|
||||||
|
return self._caller.get_own_jid()
|
||||||
|
|
||||||
def add_stanza(self, stanza, is_message=False):
|
def add_stanza(self, stanza, is_message=False):
|
||||||
if self.Connection:
|
if self.Connection:
|
||||||
if self.Connection.state == -1:
|
if self.Connection.state == -1:
|
||||||
|
|
Loading…
Add table
Reference in a new issue