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.vcard_supported = False
|
||||
self.private_storage_supported = False
|
||||
self.archiving_supported = False
|
||||
self.archive_pref_supported = False
|
||||
|
||||
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)
|
||||
self.send_pb_purge(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):
|
||||
self.archive_auto_supported = True
|
||||
if features.__contains__(common.xmpp.NS_ARCHIVE_MANAGE):
|
||||
|
|
|
@ -1573,11 +1573,12 @@ class Interface:
|
|||
if gajim.connections[account].pep_supported and dbus_support.supported \
|
||||
and gajim.config.get_per('accounts', account, 'publish_location'):
|
||||
location_listener.enable()
|
||||
# Start merging logs from server
|
||||
gajim.connections[account].request_modifications_page(
|
||||
gajim.config.get_per('accounts', account, 'last_archiving_time'))
|
||||
gajim.config.set_per('accounts', account, 'last_archiving_time',
|
||||
time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime()))
|
||||
if gajim.connections[account].archiving_supported:
|
||||
# Start merging logs from server
|
||||
gajim.connections[account].request_modifications_page(
|
||||
gajim.config.get_per('accounts', account, 'last_archiving_time'))
|
||||
gajim.config.set_per('accounts', account, 'last_archiving_time',
|
||||
time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime()))
|
||||
|
||||
def handle_event_metacontacts(self, account, tags_list):
|
||||
gajim.contacts.define_metacontacts(account, tags_list)
|
||||
|
|
Loading…
Reference in New Issue