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

Preferences: Add setting to disable metacontacts

parent 27f2ce46
Pipeline #6548 failed with stages
in 5 minutes and 38 seconds
......@@ -30,6 +30,10 @@ def __init__(self, con):
self.available = False
def get_metacontacts(self):
if not app.settings.get('metacontacts_enabled'):
self._con.connect_machine()
return
self._log.info('Request')
node = nbxmpp.Node('storage', attrs={'xmlns': 'storage:metacontacts'})
iq = nbxmpp.Iq('get', Namespace.PRIVATE, payload=node)
......
......@@ -139,6 +139,7 @@ class _ACCOUNT_DEFAULT:
'chat_merge_consecutive_nickname': False,
'chat_merge_consecutive_nickname_indent': ' ',
'ctrl_tab_go_to_next_composing': True,
'metacontacts_enabled': True,
'confirm_metacontacts': '',
'confirm_block': '',
'enable_negative_priority': False,
......
......@@ -249,6 +249,11 @@ def __init__(self, *args):
'mergeaccounts',
callback=self._on_merge_accounts),
Setting(SettingKind.SWITCH,
_('Enable Metacontacts'),
SettingType.CONFIG,
'metacontacts_enabled'),
Setting(SettingKind.SWITCH,
_('Show Avatars'),
SettingType.CONFIG,
......
......@@ -3664,11 +3664,7 @@ def on_drop_in_contact(self, widget, account_source, c_source, account_dest,
con_dest = app.connections[account_dest]
if (not con_source.get_module('MetaContacts').available or
not con_dest.get_module('MetaContacts').available):
WarningDialog(_('Metacontacts storage not supported by '
'your server'),
_('Your server does not support storing metacontacts '
'information. So this information will not be saved on next '
'reconnection.'))
return
def merge_contacts(is_checked=None):
contacts = 0
......
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