Update httpupload action on discovery
This commit is contained in:
parent
afc3075415
commit
36f23c9cf2
2 changed files with 5 additions and 3 deletions
|
@ -165,7 +165,6 @@ class CommonConnection:
|
||||||
# the fake jid
|
# the fake jid
|
||||||
self.groupchat_jids = {} # {ID : groupchat_jid}
|
self.groupchat_jids = {} # {ID : groupchat_jid}
|
||||||
|
|
||||||
self.httpupload = False
|
|
||||||
self.privacy_rules_supported = False
|
self.privacy_rules_supported = False
|
||||||
self.vcard_supported = False
|
self.vcard_supported = False
|
||||||
self.private_storage_supported = False
|
self.private_storage_supported = False
|
||||||
|
@ -1970,8 +1969,6 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
|
|
||||||
self._continue_connection_request_privacy()
|
self._continue_connection_request_privacy()
|
||||||
|
|
||||||
if nbxmpp.NS_HTTPUPLOAD in obj.features:
|
|
||||||
self.httpupload = True
|
|
||||||
if nbxmpp.NS_BYTESTREAM in obj.features and \
|
if nbxmpp.NS_BYTESTREAM in obj.features and \
|
||||||
app.config.get_per('accounts', self.name, 'use_ft_proxies'):
|
app.config.get_per('accounts', self.name, 'use_ft_proxies'):
|
||||||
our_fjid = helpers.parse_jid(our_jid + '/' + \
|
our_fjid = helpers.parse_jid(our_jid + '/' + \
|
||||||
|
|
|
@ -47,6 +47,7 @@ class ConnectionHTTPUpload:
|
||||||
(XEP-0363, https://xmpp.org/extensions/xep-0363.html)
|
(XEP-0363, https://xmpp.org/extensions/xep-0363.html)
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
self.httpupload = False
|
||||||
self.encrypted_upload = False
|
self.encrypted_upload = False
|
||||||
self.component = None
|
self.component = None
|
||||||
self.max_file_size = None # maximum file size in bytes
|
self.max_file_size = None # maximum file size in bytes
|
||||||
|
@ -103,6 +104,10 @@ class ConnectionHTTPUpload:
|
||||||
log.info('%s has a maximum file size of: %s MiB',
|
log.info('%s has a maximum file size of: %s MiB',
|
||||||
account, self.max_file_size/(1024*1024))
|
account, self.max_file_size/(1024*1024))
|
||||||
|
|
||||||
|
self.httpupload = True
|
||||||
|
for ctrl in app.interface.msg_win_mgr.get_controls(acct=self.name):
|
||||||
|
ctrl.update_actions()
|
||||||
|
|
||||||
def handle_outgoing_stanza(self, event):
|
def handle_outgoing_stanza(self, event):
|
||||||
if event.conn.name != self.name:
|
if event.conn.name != self.name:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue