From d69700b3402ccb81984c2c269bb2edbb5f3fbc10 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sun, 12 Apr 2026 00:40:37 +0200 Subject: history_sinc.vala: Do not ask 'before' ID on timestamp range According to their devs, for some reason some servers like Prosody dislike receiving an archive query with *both* a timestamp range and a 'before' ID, returning an item-not-found error in such case. An example query is shown below. Instead, now the 'before' ID is left empty, which seems to have restored the expected behaviour. urn:xmpp:mam:2 2026-04-11T02:25:00Z 2026-04-11T19:41:12Z 20 redacted --- libdino/src/service/history_sync.vala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libdino/src') diff --git a/libdino/src/service/history_sync.vala b/libdino/src/service/history_sync.vala index 879feab7..826156d6 100644 --- a/libdino/src/service/history_sync.vala +++ b/libdino/src/service/history_sync.vala @@ -277,8 +277,8 @@ public class Dino.HistorySync { debug("[%s | %s] Fetching between %s (%s) and %s (%s)", account.bare_jid.to_string(), mam_server.to_string(), earliest_time.to_string(), earlier_range[db.mam_catchup.to_id], latest_time.to_string(), later_range[db.mam_catchup.from_id]); var query_params = new Xmpp.MessageArchiveManagement.V2.MamQueryParams.query_between(mam_server, - earliest_time, earlier_range[db.mam_catchup.to_id], - latest_time, later_range[db.mam_catchup.from_id]); + earliest_time, null, + latest_time, null); PageRequestResult page_result = yield fetch_query(account, query_params, later_range_id, cancellable); @@ -313,7 +313,7 @@ public class Dino.HistorySync { query_params = new Xmpp.MessageArchiveManagement.V2.MamQueryParams.query_between( mam_server, until_earliest_time, null, - latest_time, latest_id + latest_time, null ); } yield fetch_query(account, query_params, range[db.mam_catchup.id], cancellable); -- cgit v1.2.3