fix: slixmpp 1.8.0 breaking changes
This commit is contained in:
parent
d8785ae0bd
commit
cca5bc5702
4 changed files with 15 additions and 5 deletions
|
@ -633,7 +633,9 @@ class Core:
|
||||||
else:
|
else:
|
||||||
self.do_command(''.join(char_list), True)
|
self.do_command(''.join(char_list), True)
|
||||||
if self.status.show not in ('xa', 'away'):
|
if self.status.show not in ('xa', 'away'):
|
||||||
|
asyncio.ensure_future(
|
||||||
self.xmpp.plugin['xep_0319'].idle()
|
self.xmpp.plugin['xep_0319'].idle()
|
||||||
|
)
|
||||||
self.doupdate()
|
self.doupdate()
|
||||||
|
|
||||||
def save_config(self):
|
def save_config(self):
|
||||||
|
|
|
@ -98,8 +98,10 @@ class HandlerCore:
|
||||||
self.core.xmpp.plugin['xep_0280'].enable()
|
self.core.xmpp.plugin['xep_0280'].enable()
|
||||||
self.core.check_bookmark_storage(features)
|
self.core.check_bookmark_storage(features)
|
||||||
|
|
||||||
|
asyncio.ensure_future(
|
||||||
self.core.xmpp.plugin['xep_0030'].get_info(
|
self.core.xmpp.plugin['xep_0030'].get_info(
|
||||||
jid=self.core.xmpp.boundjid.domain, callback=callback)
|
jid=self.core.xmpp.boundjid.domain, callback=callback)
|
||||||
|
)
|
||||||
|
|
||||||
def find_identities(self, _):
|
def find_identities(self, _):
|
||||||
asyncio.ensure_future(
|
asyncio.ensure_future(
|
||||||
|
|
|
@ -8,6 +8,7 @@ TODO: Check that they are fixed and remove those hacks
|
||||||
from slixmpp.stanza import Message
|
from slixmpp.stanza import Message
|
||||||
from slixmpp.xmlstream import ET
|
from slixmpp.xmlstream import ET
|
||||||
|
|
||||||
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
@ -22,7 +23,9 @@ def has_identity(xmpp, jid, identity, on_true=None, on_false=None):
|
||||||
if not res and on_false is not None:
|
if not res and on_false is not None:
|
||||||
on_false()
|
on_false()
|
||||||
|
|
||||||
|
asyncio.ensure_future(
|
||||||
xmpp.plugin['xep_0030'].get_info(jid=jid, callback=_cb)
|
xmpp.plugin['xep_0030'].get_info(jid=jid, callback=_cb)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_room_form(xmpp, room, callback):
|
def get_room_form(xmpp, room, callback):
|
||||||
|
|
|
@ -10,6 +10,7 @@ Add some facilities that are not available on the XEP_0045
|
||||||
slix plugin
|
slix plugin
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import asyncio
|
||||||
from xml.etree import ElementTree as ET
|
from xml.etree import ElementTree as ET
|
||||||
|
|
||||||
from poezio.common import safeJID
|
from poezio.common import safeJID
|
||||||
|
@ -137,7 +138,9 @@ def join_groupchat(core,
|
||||||
xmpp.plugin['xep_0045'].our_nicks[jid] = to.resource
|
xmpp.plugin['xep_0045'].our_nicks[jid] = to.resource
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
asyncio.ensure_future(
|
||||||
xmpp.plugin['xep_0030'].get_info(jid=jid, callback=on_disco)
|
xmpp.plugin['xep_0030'].get_info(jid=jid, callback=on_disco)
|
||||||
|
)
|
||||||
except (IqError, IqTimeout):
|
except (IqError, IqTimeout):
|
||||||
return core.information('Failed to retrieve messages', 'Error')
|
return core.information('Failed to retrieve messages', 'Error')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue