Bug Fix - Global Messages search: some search results are missing

The messages were displayed only for the rooms opened recently by the users.
This commit is contained in:
giomfo
2018-03-29 16:30:42 +02:00
parent 18145be473
commit 87778e9639
@@ -1,6 +1,7 @@
/*
Copyright 2016 OpenMarket Ltd
Copyright 2017 Vector Creations Ltd
Copyright 2018 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.
@@ -46,8 +47,8 @@
MXKRoomDataSource *roomDataSource;
if (roomId)
{
roomDataSource = [roomDataSourceManager roomDataSourceForRoom:roomId create:NO];
// Check whether the user knows this room to create the room data source if it doesn't exist.
roomDataSource = [roomDataSourceManager roomDataSourceForRoom:roomId create:([self.mxSession roomWithRoomId:roomId])];
if (roomDataSource)
{
// Prepare text font used to highlight the search pattern.