Setup the client media retention policy

This commit is contained in:
Stefan Ceriu
2025-04-09 15:49:40 +03:00
committed by Stefan Ceriu
parent 0e7533145a
commit fe9cb2e2f0
@@ -215,6 +215,19 @@ class ClientProxy: ClientProxyProtocol {
}
}
.store(in: &cancellables)
Task {
do {
try await client.setMediaRetentionPolicy(policy: .init(maxCacheSize: nil,
maxFileSize: nil,
// 30 days in seconds
lastAccessExpiry: 30 * 24 * 60 * 60,
// 1 day in seconds
cleanupFrequency: 24 * 60 * 60))
} catch {
MXLog.error("Failed setting media retention policy with error: \(error)")
}
}
}
var userID: String {