diff options
| author | fiaxh <git@lightrise.org> | 2025-11-15 08:58:11 -0600 |
|---|---|---|
| committer | fiaxh <git@lightrise.org> | 2025-11-15 08:58:11 -0600 |
| commit | b5f8dfc01a312cb49f70497a5158e453f89746c3 (patch) | |
| tree | ebe1128aa63a31ce71da0e89f25b320e00cbf60a | |
| parent | afcc2f4037bcb7b63c04ce12600ccfd360e75719 (diff) | |
Fix fetching some MAM history for every MUC
| -rw-r--r-- | libdino/src/service/muc_manager.vala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libdino/src/service/muc_manager.vala b/libdino/src/service/muc_manager.vala index fd8b4336..29c6c5ca 100644 --- a/libdino/src/service/muc_manager.vala +++ b/libdino/src/service/muc_manager.vala @@ -112,7 +112,9 @@ public class MucManager : StreamInteractionModule, Object { } if (!mucs_sync_cancellables[account].has_key(jid.bare_jid)) { mucs_sync_cancellables[account][jid.bare_jid] = new Cancellable(); - history_sync.fetch_everything.begin(account, jid.bare_jid, mucs_sync_cancellables[account][jid.bare_jid], conversation.active_last_changed, (_, res) => { + // If the conversation was newly opened, fetch a bit before + DateTime fetch_from_time = conversation.active_last_changed.add(-TimeSpan.DAY * 5); + history_sync.fetch_everything.begin(account, jid.bare_jid, mucs_sync_cancellables[account][jid.bare_jid], fetch_from_time, (_, res) => { history_sync.fetch_everything.end(res); mucs_sync_cancellables[account].unset(jid.bare_jid); }); |
