Changed in Libresapi: Closing distant connection (chat) requires now ChatId that is used in other functions, instead of DistantCharPeerId

This commit is contained in:
Konrad 2017-12-29 16:07:39 +01:00
parent 4b25684c44
commit 74a56f646d

View File

@ -1435,10 +1435,12 @@ void ChatHandler::handleCloseDistantChatConnexion(Request& req, Response& resp)
{
std::string distant_chat_hex;
req.mStream << makeKeyValueReference("distant_chat_hex", distant_chat_hex);
ChatId chatId(distant_chat_hex);
DistantChatPeerId chat_id(distant_chat_hex);
if (mRsMsgs->closeDistantChatConnexion(chat_id)) resp.setOk();
else resp.setFail("Failed to close distant chat");
if (mRsMsgs->closeDistantChatConnexion(chatId.toDistantChatId()))
resp.setOk();
else
resp.setFail("Failed to close distant chat");
}
void ChatHandler::handleCreateLobby(Request& req, Response& resp)