Commit 47943bf8 authored by Benjamin REIS's avatar Benjamin REIS
Browse files

adapt findOneToOneChatroom to both basic and clientGroup

parent fe8930ce
...@@ -172,8 +172,10 @@ shared_ptr<AbstractChatRoom> Core::findOneToOneChatRoom ( ...@@ -172,8 +172,10 @@ shared_ptr<AbstractChatRoom> Core::findOneToOneChatRoom (
for (const auto &chatRoom : d->chatRooms) { for (const auto &chatRoom : d->chatRooms) {
if ( if (
chatRoom->getParticipantCount() == 1 && chatRoom->getParticipantCount() == 1 &&
chatRoom->getLocalAddress() == localAddress && (
participantAddress == chatRoom->getParticipants().front()->getAddress() (chatRoom->getLocalAddress() == localAddress && participantAddress == chatRoom->getParticipants().front()->getAddress()) ||
(chatRoom->getLocalAddress() == localAddress.getAddressWithoutGruu() && chatRoom->getPeerAddress() == participantAddress)
)
) )
return chatRoom; return chatRoom;
} }
......
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