mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-01 05:36:57 +02:00
Room search: search result should include the search pattern when it corresponds to a valid room alias or id.
+ Room search: Room preview should be used when user selects a public room that he did not join yet. https://github.com/vector-im/vector-ios/issues/328 https://github.com/vector-im/vector-ios/issues/329
This commit is contained in:
@@ -1956,8 +1956,15 @@
|
||||
// Attempt to join the room (keep reference on the potential eventId, the preview data will be removed automatically in case of success).
|
||||
NSString *eventId = roomPreviewData.eventId;
|
||||
|
||||
// We promote here join by room alias instead of room id when an alias is available.
|
||||
NSString *roomIdOrAlias = roomPreviewData.roomId;
|
||||
if (roomPreviewData.roomDataSource.room.state.aliases.count)
|
||||
{
|
||||
roomIdOrAlias = roomPreviewData.roomDataSource.room.state.aliases.firstObject;
|
||||
}
|
||||
|
||||
// Note in case of simple link to a room the signUrl param is nil
|
||||
[self joinRoomWithRoomId:roomPreviewData.roomId andSignUrl:roomPreviewData.emailInvitation.signUrl completion:^(BOOL succeed) {
|
||||
[self joinRoomWithRoomIdOrAlias:roomIdOrAlias andSignUrl:roomPreviewData.emailInvitation.signUrl completion:^(BOOL succeed) {
|
||||
|
||||
if (succeed)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user