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 //TODO error
return; return;
} }
Address proxyConfigContact = lc.getDefaultProxyConfig().getContact();
mChatRoom = core.getChatRoomFromUri(mRemoteSipAddress.asString()); if (proxyConfigContact != null) {
mChatRoom = lc.findOneToOneChatRoom(proxyConfigContact, mRemoteSipAddress);
}
if (mChatRoom == null) {
mChatRoom = core.getChatRoomFromUri(mRemoteSipAddress.asStringUriOnly());
}
mChatRoom.setListener(this); mChatRoom.setListener(this);
mChatRoom.markAsRead(); mChatRoom.markAsRead();
LinphoneActivity.instance().updateMissedChatCount(); LinphoneActivity.instance().updateMissedChatCount();