-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/1.11.14/master'
- Loading branch information
Showing
16 changed files
with
330 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## Changes in 1.11.14 (2024-06-17) | ||
|
||
No significant changes. | ||
|
||
|
||
## Changes in 1.11.13 (2024-06-12) | ||
|
||
Others | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
|
||
"NSCalendarsUsageDescription" = "Sjå dei planlagde møta dine i appen."; | ||
"NSFaceIDUsageDescription" = "Face ID vert brukt til å få tilgang til appen din."; | ||
// Permissions usage explanations | ||
"NSCameraUsageDescription" = "Kameraet vert brukt til videosamtalar, og til å ta og laste opp bilde og videoar."; | ||
"NSMicrophoneUsageDescription" = "Appen treng tilgang til mikrofonen for samtalar, og for å spele inn video og lydmeldingar."; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// | ||
// Copyright 2024 New Vector Ltd | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import Foundation | ||
|
||
extension Notification.Name { | ||
static let roomSummaryDidRemoveExpiredDataFromStore = Notification.Name(MXRoomSummary.roomSummaryDidRemoveExpiredDataFromStore) | ||
} | ||
|
||
extension MXRoomSummary { | ||
@objc static let roomSummaryDidRemoveExpiredDataFromStore = "roomSummaryDidRemoveExpiredDataFromStore" | ||
@objc static let roomRetentionStateEventType = "m.room.retention" | ||
|
||
private enum Constants { | ||
static let roomRetentionInDaysKey = "roomRetentionInDays" | ||
} | ||
/// Get the room messages retention period in days | ||
func roomRetentionPeriodInDays() -> uint { | ||
if let period = self.others[Constants.roomRetentionInDaysKey] as? uint { | ||
return period | ||
} else { | ||
return 365 | ||
} | ||
} | ||
|
||
/// Get the timestamp below which the received messages must be removed from the store, and the display | ||
@objc func minimumTimestamp() -> UInt64 { | ||
let periodInMs = Tools.durationInMs(fromDays: self.roomRetentionPeriodInDays()) | ||
let currentTs = (UInt64)(Date().timeIntervalSince1970 * 1000) | ||
return (currentTs - periodInMs) | ||
} | ||
|
||
/// Remove the expired messages from the store. | ||
/// If some data are removed, this operation posts the notification: roomSummaryDidRemoveExpiredDataFromStore. | ||
/// This operation does not commit the potential change. We let the caller trigger the commit when this is the more suitable. | ||
/// | ||
/// Provide a boolean telling whether some data have been removed. | ||
@objc func removeExpiredRoomContentsFromStore() -> Bool { | ||
let ret = self.mxSession.store.removeAllMessagesSent(before: self.minimumTimestamp(), inRoom: roomId) | ||
if ret { | ||
NotificationCenter.default.post(name: .roomSummaryDidRemoveExpiredDataFromStore, object: self) | ||
} | ||
return ret | ||
} | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.