diff --git a/src/core/core-chat-room.cpp b/src/core/core-chat-room.cpp index ac50b37fa..84ae4d63a 100644 --- a/src/core/core-chat-room.cpp +++ b/src/core/core-chat-room.cpp @@ -105,7 +105,18 @@ const list> &Core::getChatRooms () const { shared_ptr Core::findChatRoom (const Address &peerAddress) const { L_D(); - auto it = d->chatRoomsByUri.find(getCleanedPeerAddress(peerAddress).asStringUriOnly()); + + Address cleanedAddress = getCleanedPeerAddress(peerAddress); + auto it = d->chatRoomsByUri.find(cleanedAddress.asStringUriOnly()); + if (it != d->chatRoomsByUri.cend()) + return it->second; + + // TODO: Remove me, temp workaround. + cleanedAddress.setDomain(Address(linphone_core_get_conference_factory_uri(d->cCore)).getDomain()); + lWarning() << "We don't found the chat room with address " << peerAddress.asString() << + " as a temporary workaround, searching with " << cleanedAddress.asString(); + + it = d->chatRoomsByUri.find(cleanedAddress.asStringUriOnly()); return it == d->chatRoomsByUri.cend() ? shared_ptr() : it->second; }