Commit 1e644108 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Apply prefix to generated search result in magic search

parent 7f68c561
......@@ -17,6 +17,7 @@ This changelog file was started on October 2019. Previous changes were more or l
- Auto acquire and release of audio focus for Android.
- Added API to play user's ringtone instead of default ringtone for Android.
- New method linphone_core_audio_route_changed(), to fix audio issues when switching audio to some low sample rate Bluetooth devices.
- Added callback to notify a message is about to be sent.
### Changed
- Improved Android network manager.
......@@ -28,6 +29,7 @@ This changelog file was started on October 2019. Previous changes were more or l
which wasn't the case before if the getChar() was done after the composing callback was triggered for this character.
- linphone_core_interpret_url() will unescape characters first if possible if only a username is given as input parameter.
- linphone_chat_message_cancel_file_transfer() no longer deletes the file for outgoing messages.
- magic search result created from filter now applies the international prefix of the default proxy config if possible.
### Fixed
- Internal refactoring of management of locally played tones, in order to fix race conditions.
......@@ -36,6 +38,7 @@ This changelog file was started on October 2019. Previous changes were more or l
- Chat message lost during attachment auto download if Core stopped during the process.
- Windows tests.
- Name of MediaCodec encoder and decoder filters in H264Helper Java class.
- Both FileContent and FileTransferContent being present in linphone_chat_message_get_contents() list until upload is finished.
## [4.4.0] 2020-06-16
......
......@@ -162,8 +162,7 @@ list<SearchResult> MagicSearch::getContactListFromFilter (const string &filter,
if (domain) {
string strTmp = filter;
transform(strTmp.begin(), strTmp.end(), strTmp.begin(), [](unsigned char c){ return tolower(c); });
string filterAddress = "sip:" + strTmp + "@" + domain;
LinphoneAddress *lastResult = linphone_core_create_address(this->getCore()->getCCore(), filterAddress.c_str());
LinphoneAddress *lastResult = linphone_core_interpret_url(this->getCore()->getCCore(), strTmp.c_str());
if (lastResult) {
returnList.push_back(SearchResult(0, lastResult, "", nullptr));
linphone_address_unref(lastResult);
......
......@@ -1157,7 +1157,7 @@ static void search_friend_with_presence(void) {
_check_friend_result_list(manager->lc, resultList, 0, sFriends[10], NULL);//"sip:+111223344@sip.example.org"
_check_friend_result_list(manager->lc, resultList, 1, sFriends[11], NULL);//"sip:+33655667788@sip.example.org"
_check_friend_result_list(manager->lc, resultList, 2, chloeSipUri, chloePhoneNumber);//"sip:ch@sip.example.org"
_check_friend_result_list(manager->lc, resultList, 3, "sip:33@sip.example.org", NULL);//"sip:33@sip.example.org"
_check_friend_result_list(manager->lc, resultList, 3, "sip:+3333@sip.example.org", NULL);//"sip:+3333@sip.example.org"
bctbx_list_free_with_data(resultList, (bctbx_list_free_func)linphone_magic_search_unref);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment