Commit 19ab701f authored by DanmeiChen's avatar DanmeiChen

create a basic chatroom when non Encrypted

parent a9545e30
......@@ -158,7 +158,6 @@
return;
if (!linphone_proxy_config_get_conference_factory_uri(linphone_core_get_default_proxy_config(LC)) || !_isGroupChat) {
// Create directly a basic chat room if there's no factory uri
LinphoneAddress *addr = linphone_address_new(cell.addressLabel.text.UTF8String);
[PhoneMainView.instance getOrCreateOneToOneChatRoom:addr waitView:_waitView isEncrypted:_isEncrypted];
if (!addr) {
......
......@@ -919,7 +919,7 @@ static RootViewManager *rootViewManagerInstance = nil;
- (LinphoneChatRoom *)createChatRoom:(const char *)subject addresses:(bctbx_list_t *)addresses andWaitView:(UIView *)waitView isEncrypted:(BOOL)isEncrypted{
if (!linphone_proxy_config_get_conference_factory_uri(linphone_core_get_default_proxy_config(LC))
|| ([[LinphoneManager instance] lpConfigBoolForKey:@"prefer_basic_chat_room" inSection:@"misc"] && bctbx_list_size(addresses) == 1)) {
|| ((bctbx_list_size(addresses) == 1) && ([[LinphoneManager instance] lpConfigBoolForKey:@"prefer_basic_chat_room" inSection:@"misc"] || !isEncrypted))) {
// If there's no factory uri, create a basic chat room
if (bctbx_list_size(addresses) != 1) {
// Display Error: unsuported group chat
......
......@@ -488,7 +488,7 @@
if (addr && cfg) {
const char *username = linphone_proxy_config_get_dial_escape_plus(cfg) ? normvalue : value.UTF8String;
if (linphone_proxy_config_is_phone_number(cfg, username))
linphone_address_set_username(addr, username);
linphone_address_set_username(addr, linphone_proxy_config_normalize_phone_number(cfg, username));
}
return addr;
}
......
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