request message archiving only if server supports it.
This commit is contained in:
parent
ca43e5441c
commit
9282678d8c
|
@ -153,6 +153,7 @@ class CommonConnection:
|
||||||
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
|
||||||
|
self.archiving_supported = False
|
||||||
self.archive_pref_supported = False
|
self.archive_pref_supported = False
|
||||||
|
|
||||||
self.muc_jid = {} # jid of muc server for each transport type
|
self.muc_jid = {} # jid of muc server for each transport type
|
||||||
|
|
|
@ -368,6 +368,8 @@ class ConnectionDisco:
|
||||||
our_jid = gajim.get_jid_from_account(self.name)
|
our_jid = gajim.get_jid_from_account(self.name)
|
||||||
self.send_pb_purge(our_jid, 'storage:bookmarks')
|
self.send_pb_purge(our_jid, 'storage:bookmarks')
|
||||||
self.send_pb_delete(our_jid, 'storage:bookmarks')
|
self.send_pb_delete(our_jid, 'storage:bookmarks')
|
||||||
|
if features.__contains__(common.xmpp.NS_ARCHIVE):
|
||||||
|
self.archiving_supported = True
|
||||||
if features.__contains__(common.xmpp.NS_ARCHIVE_AUTO):
|
if features.__contains__(common.xmpp.NS_ARCHIVE_AUTO):
|
||||||
self.archive_auto_supported = True
|
self.archive_auto_supported = True
|
||||||
if features.__contains__(common.xmpp.NS_ARCHIVE_MANAGE):
|
if features.__contains__(common.xmpp.NS_ARCHIVE_MANAGE):
|
||||||
|
|
|
@ -1573,6 +1573,7 @@ class Interface:
|
||||||
if gajim.connections[account].pep_supported and dbus_support.supported \
|
if gajim.connections[account].pep_supported and dbus_support.supported \
|
||||||
and gajim.config.get_per('accounts', account, 'publish_location'):
|
and gajim.config.get_per('accounts', account, 'publish_location'):
|
||||||
location_listener.enable()
|
location_listener.enable()
|
||||||
|
if gajim.connections[account].archiving_supported:
|
||||||
# Start merging logs from server
|
# Start merging logs from server
|
||||||
gajim.connections[account].request_modifications_page(
|
gajim.connections[account].request_modifications_page(
|
||||||
gajim.config.get_per('accounts', account, 'last_archiving_time'))
|
gajim.config.get_per('accounts', account, 'last_archiving_time'))
|
||||||
|
|
Loading…
Reference in New Issue