libresapi: silent /chat/initiate_distant_chat

Avoid to forge the
[Starting distant chat. Please wait for secure tunnel to be established]
message on requesting chat id from API as it is a nuisance in most
libresapi use cases
This commit is contained in:
Gioacchino Mazzurco 2017-06-06 18:57:32 +02:00
parent 0098433242
commit 528317d374
4 changed files with 17 additions and 7 deletions

View file

@ -1199,9 +1199,9 @@ void ChatHandler::handleInitiateDistantChatConnexion(Request& req, Response& res
DistantChatPeerId distant_chat_id;
uint32_t error_code;
if(mRsMsgs->initiateDistantChatConnexion(receiver_id, sender_id,
distant_chat_id, error_code))
resp.setOk();
if(mRsMsgs->initiateDistantChatConnexion( receiver_id, sender_id,
distant_chat_id, error_code,
false )) resp.setOk();
else resp.setFail("Failed to initiate distant chat");
ChatId chat_id(distant_chat_id);