Skip to content
Snippets Groups Projects
Commit 37e9bc56 authored by Adrien Béraud's avatar Adrien Béraud Committed by Sébastien Blin
Browse files

search: support using uri with nameserver, unicode characters

Change-Id: I8128b0ec3a3bcfa38bc4b68e8c4b453ded24f6e7
parent d348cc67
No related branches found
No related tags found
No related merge requests found
......@@ -375,7 +375,7 @@ public class ConversationFacade {
} else if (uri.isRingId()) {
return mContactService.getLoadedContact(account.getAccountID(), account.getContactFromCache(uri))
.map(contact -> Collections.singletonList(Observable.just(new SmartListViewModel(account.getAccountID(), contact, null))));
} else if (account.canSearch()) {
} else if (account.canSearch() && !query.contains("@")) {
return mAccountService.searchUser(account.getAccountID(), query)
.map(AccountService.UserSearchResult::getResultsViewModels);
} else {
......
......@@ -1209,7 +1209,7 @@ public class AccountService {
return Single.error(e);
}
return getSearchResults()
.filter(r -> account.equals(r.accountId) && query.equals(r.query))
.filter(r -> account.equals(r.accountId) && encodedUrl.equals(r.query))
.firstOrError()
.doOnSubscribe(s -> mExecutor.execute(() -> Ringservice.searchUser(account, encodedUrl)))
.subscribeOn(Schedulers.from(mExecutor));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment