Repository navigation
feat(ios): add a retentionPeriod option - #291
Merged
Merged
Conversation
|
Caution Review failedThe pull request is closed. Pre-merge checks:
|
Prunes on insert with Android's RetentionPolicy cutoff; no removal event, as on Android. Closes #286
easyhooon
force-pushed
the
feat/ios-retention-period
branch
from
November 12, 2026 04:36
4358edc to
01038b5
Compare
easyhooon
marked this pull request as ready for review
November 12, 2026 06:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
DariConfiguration.retentionPeriodto the iOS SDK, matching Android'sDariConfig.retentionPeriod. Closes #286.Changes
DariConfiguration(retentionPeriod: TimeInterval? = nil), in seconds.nilkeeps today's behavior; a non-positive value failsstart()like Android'srequire.MessageStore.adddrops records whoserequestTimestampis older thannow - retentionPeriod, the same cutoff asRetentionPolicyindari-runtime. A record stamped exactly at the cutoff is kept..infinity) saturate toInt64.maxmilliseconds instead of trapping, as Kotlin'sinWholeMillisecondsdoes.ios/index.mdx(+ ko) option tables updated.Notes for reviewers
maxEntriestrim. Until Clear, a reconnect or the desktop's 2,000-row cap, the desktop keeps showing them, and opening one returns not found. A removal event would need a protocol change on both platforms, so it's left as a follow-up (noted on feat(ios): add a retentionPeriod option #286).swift testpasses, including three newMessageStoretests.