Commit c63e3263 authored by Philipp Hörist's avatar Philipp Hörist

Adapt Zeroconf to nbxmpp changes

Fixes #9503
parent b548b90a
Pipeline #2882 passed with stages
in 3 minutes and 55 seconds
......@@ -26,7 +26,10 @@ from gajim.common.types import ConnectionT
log = logging.getLogger('gajim.c.m')
ZEROCONF_MODULES = ['adhoc_commands', 'receipts', 'discovery']
ZEROCONF_MODULES = ['adhoc_commands',
'receipts',
'discovery',
'chatstates']
_imported_modules = [] # type: List[tuple]
_modules = {} # type: Dict[str, Dict[str, Any]]
......
......@@ -15,6 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
from unittest.mock import Mock
from gajim.common import app
import nbxmpp
from nbxmpp.idlequeue import IdleObject
......@@ -141,6 +143,7 @@ class P2PClient(IdleObject):
self.Namespace = 'jabber:client'
self.protocol_type = 'XMPP'
self.defaultNamespace = self.Namespace
self.Smacks = Mock()
self._component = 0
self._registered_name = None
self._caller = conn_holder.caller
......@@ -190,6 +193,9 @@ class P2PClient(IdleObject):
self.on_responses = {}
def get_bound_jid(self):
return self._caller.get_own_jid()
def add_stanza(self, stanza, is_message=False):
if self.Connection:
if self.Connection.state == -1:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment