xep_0363: Remove unused parameters to find_upload_services
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
cdfb5d56fc
commit
b881c6729b
@ -6,6 +6,7 @@
|
|||||||
See the file LICENSE for copying permission.
|
See the file LICENSE for copying permission.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from slixmpp import Iq
|
from slixmpp import Iq
|
||||||
|
@ -68,8 +68,7 @@ class XEP_0363(BasePlugin):
|
|||||||
def _handle_request(self, iq):
|
def _handle_request(self, iq):
|
||||||
self.xmpp.event('http_upload_request', iq)
|
self.xmpp.event('http_upload_request', iq)
|
||||||
|
|
||||||
async def find_upload_service(self, ifrom=None, timeout=None, callback=None,
|
async def find_upload_service(self, timeout=None):
|
||||||
timeout_callback=None):
|
|
||||||
infos = [self.xmpp['xep_0030'].get_info(self.xmpp.boundjid.domain)]
|
infos = [self.xmpp['xep_0030'].get_info(self.xmpp.boundjid.domain)]
|
||||||
iq_items = await self.xmpp['xep_0030'].get_items(
|
iq_items = await self.xmpp['xep_0030'].get_items(
|
||||||
self.xmpp.boundjid.domain, timeout=timeout)
|
self.xmpp.boundjid.domain, timeout=timeout)
|
||||||
@ -100,7 +99,7 @@ class XEP_0363(BasePlugin):
|
|||||||
callback=None, timeout_callback=None):
|
callback=None, timeout_callback=None):
|
||||||
''' Helper function which does all of the uploading process. '''
|
''' Helper function which does all of the uploading process. '''
|
||||||
if self.upload_service is None:
|
if self.upload_service is None:
|
||||||
info_iq = await self.find_upload_service(ifrom=ifrom, timeout=timeout)
|
info_iq = await self.find_upload_service(timeout=timeout)
|
||||||
if info_iq is None:
|
if info_iq is None:
|
||||||
raise UploadServiceNotFound()
|
raise UploadServiceNotFound()
|
||||||
self.upload_service = info_iq['from']
|
self.upload_service = info_iq['from']
|
||||||
|
Loading…
Reference in New Issue
Block a user