[openpgp] Adapt updating caps
This commit is contained in:
@@ -115,11 +115,8 @@ class OpenPGPPlugin(GajimPlugin):
|
|||||||
|
|
||||||
def activate(self):
|
def activate(self):
|
||||||
for account in app.connections:
|
for account in app.connections:
|
||||||
if app.caps_hash[account] != '':
|
|
||||||
# Gajim has already a caps hash calculated, update it
|
|
||||||
helpers.update_optional_features(account)
|
|
||||||
|
|
||||||
con = app.connections[account]
|
con = app.connections[account]
|
||||||
|
con.get_module('Caps').update_caps()
|
||||||
if app.account_is_connected(account):
|
if app.account_is_connected(account):
|
||||||
if con.get_module('OpenPGP').secret_key_available:
|
if con.get_module('OpenPGP').secret_key_available:
|
||||||
log.info('%s => Publish keylist and public key '
|
log.info('%s => Publish keylist and public key '
|
||||||
@@ -131,10 +128,8 @@ class OpenPGPPlugin(GajimPlugin):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _update_caps(account):
|
def _update_caps(_account, features):
|
||||||
namespace = nbxmpp.NS_OPENPGP_PK + '+notify'
|
features.append('%s+notify' % nbxmpp.NS_OPENPGP_PK)
|
||||||
if namespace not in app.gajim_optional_features[account]:
|
|
||||||
app.gajim_optional_features[account].append(namespace)
|
|
||||||
|
|
||||||
def activate_encryption(self, chat_control):
|
def activate_encryption(self, chat_control):
|
||||||
account = chat_control.account
|
account = chat_control.account
|
||||||
|
|||||||
Reference in New Issue
Block a user