diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-04-12 00:40:37 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-04-12 00:40:37 +0200 |
| commit | d69700b3402ccb81984c2c269bb2edbb5f3fbc10 (patch) | |
| tree | 75958e69feb8658fde28a52e0afc7d81ec7fe426 | |
| parent | c243b22d6e8a0c8b287553bdf4ea410338458efc (diff) | |
| download | dino-master.tar.gz | |
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.
<iq id='redacted' type='set' to='redacted'>
<query xmlns='urn:xmpp:mam:2' queryid='redacted'>
<x xmlns='jabber:x:data' type='submit'>
<field type='hidden' var='FORM_TYPE'>
<value>
urn:xmpp:mam:2
</value>
</field>
<field var='start'>
<value>
2026-04-11T02:25:00Z
</value>
</field>
<field var='end'>
<value>
2026-04-11T19:41:12Z
</value>
</field>
</x>
<set xmlns='http://jabber.org/protocol/rsm'>
<max>
20
</max>
<before>
redacted
</before>
</set>
</query>
</iq>
| -rw-r--r-- | libdino/src/service/history_sync.vala | 6 |
1 files changed, 3 insertions, 3 deletions
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); |
