Skip to content
Snippets Groups Projects
Commit e7df2d93 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

HistorySync: Fix first time sync

Fixes #8810

Also remove mam_start_date migration.
mam_start_date didnt exist in Gajim 0.16.x and it doesnt hurt
if people who used the dev version download some extra messages.
Our deduplication algorithm should take care of it.
parent f7260823
No related branches found
No related tags found
No related merge requests found
......@@ -58,16 +58,13 @@ class HistorySyncAssistant(Gtk.Assistant):
self.event_id = id(self)
own_jid = self.con.get_own_jid().getStripped()
archive = app.logger.get_archive_timestamp(own_jid)
if archive is not None:
mam_start = float(archive.oldest_mam_timestamp)
else:
# Migration from old config value
mam_start = app.config.get_per(
'accounts', account, 'mam_start_date')
mam_start = ArchiveState.NEVER
archive = app.logger.get_archive_timestamp(own_jid)
if archive is not None and archive.oldest_mam_timestamp is not None:
mam_start = int(float(archive.oldest_mam_timestamp))
if not mam_start or mam_start == ArchiveState.NEVER:
if mam_start == ArchiveState.NEVER:
self.current_start = self.now
elif mam_start == ArchiveState.ALL:
self.current_start = datetime.utcfromtimestamp(0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment