Fix for chat room creation from call

This commit is contained in:
Sylvain Berfini 2018-01-12 10:16:20 +01:00
parent 86299287c9
commit a9cb1807e6

View file

@ -364,8 +364,13 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
//TODO error
return;
}
mChatRoom = core.getChatRoomFromUri(mRemoteSipAddress.asString());
Address proxyConfigContact = lc.getDefaultProxyConfig().getContact();
if (proxyConfigContact != null) {
mChatRoom = lc.findOneToOneChatRoom(proxyConfigContact, mRemoteSipAddress);
}
if (mChatRoom == null) {
mChatRoom = core.getChatRoomFromUri(mRemoteSipAddress.asStringUriOnly());
}
mChatRoom.setListener(this);
mChatRoom.markAsRead();
LinphoneActivity.instance().updateMissedChatCount();