mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Setup the client media retention policy
This commit is contained in:
committed by
Stefan Ceriu
parent
0e7533145a
commit
fe9cb2e2f0
@@ -215,6 +215,19 @@ class ClientProxy: ClientProxyProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.store(in: &cancellables)
|
.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 {
|
var userID: String {
|
||||||
|
|||||||
Reference in New Issue
Block a user