-
Notifications
You must be signed in to change notification settings - Fork 17
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/tchap_v1.99.3'
- Loading branch information
Showing
17 changed files
with
156 additions
and
68 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
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 |
---|---|---|
|
@@ -15,5 +15,5 @@ | |
// | ||
|
||
// Version | ||
MARKETING_VERSION = 1.99.2 | ||
MARKETING_VERSION = 1.99.3 | ||
CURRENT_PROJECT_VERSION = 1 |
15 changes: 0 additions & 15 deletions
15
Riot/Assets/Images.xcassets/launch_screen_logo.imageset/Contents.json
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 2022 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 MatrixSDK | ||
|
||
extension MXSession { | ||
/// Returns the valid (not leaved) direct discussion with the user in parameter. | ||
/// If not, returns nil in completion. | ||
@objc func validRoomDirectDiscussion(for userID: String, | ||
completion: @escaping (_ room: MXRoom?) -> Void) { | ||
self.hasValidDirectDiscussion(for: userID) { roomID in | ||
guard let roomID = roomID, | ||
let room = self.room(withRoomId: roomID) else { | ||
completion(nil) | ||
return | ||
} | ||
completion(room) | ||
} | ||
} | ||
|
||
/// Check if there is a valid (not leaved) direct discussion with the user in parameter, and then returns the roomID. | ||
/// If not, returns nil in completion. | ||
func hasValidDirectDiscussion(for userID: String, | ||
completion: @escaping (String?) -> Void) { | ||
let discussionFinder: DiscussionFinderType = DiscussionFinder(session: self) | ||
discussionFinder.getDiscussionIdentifier(for: userID, | ||
includeInvite: true, | ||
autoJoin: true, | ||
includeLeft: false) { response in | ||
switch response { | ||
case .success(let result): | ||
switch result { | ||
case .pendingInvite(let roomID): | ||
completion(roomID) | ||
case .joinedDiscussion(let roomID): | ||
completion(roomID) | ||
case .noDiscussion: | ||
completion(nil) | ||
} | ||
case .failure(_): | ||
completion(nil) | ||
} | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.