Commit d94a7649 authored by Ronan's avatar Ronan

feat(Core): add tmp workaround on findChatRoom

parent b914ae97
......@@ -105,7 +105,18 @@ const list<shared_ptr<ChatRoom>> &Core::getChatRooms () const {
shared_ptr<ChatRoom> 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<ChatRoom>() : it->second;
}
......
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