mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-25 15:35:49 -04:00
Expose libresapi for distant chat
Added macro to deprecate symbols usage in a crossplatform way. Deprecated Request::mMethod and related stuff that make implementation more complex without advantage. Added /chat/{initiate_distant_chat, distant_chat_status, close_distant_chat} to libresapi. Solved subtle bug in ChatId::ChatId(std::string str) that caused zeroed DistantChatPeerId being created.
This commit is contained in:
parent
f8de12d3d3
commit
9eef412b44
9 changed files with 179 additions and 82 deletions
|
@ -79,22 +79,21 @@ ChatId::ChatId(ChatLobbyId id):
|
|||
lobby_id = id;
|
||||
}
|
||||
|
||||
ChatId::ChatId(std::string str):
|
||||
lobby_id(0)
|
||||
ChatId::ChatId(std::string str) : lobby_id(0)
|
||||
{
|
||||
type = TYPE_NOT_SET;
|
||||
if(str.empty())
|
||||
return;
|
||||
type = TYPE_NOT_SET;
|
||||
if(str.empty()) return;
|
||||
|
||||
if(str[0] == 'P')
|
||||
{
|
||||
type = TYPE_PRIVATE;
|
||||
peer_id = RsPeerId(str.substr(1));
|
||||
}
|
||||
else if(str[0] == 'D')
|
||||
{
|
||||
type = TYPE_PRIVATE_DISTANT;
|
||||
distant_chat_id == DistantChatPeerId(str.substr(1));
|
||||
}
|
||||
}
|
||||
else if(str[0] == 'D')
|
||||
{
|
||||
type = TYPE_PRIVATE_DISTANT;
|
||||
distant_chat_id = DistantChatPeerId(str.substr(1));
|
||||
}
|
||||
else if(str[0] == 'L')
|
||||
{
|
||||
if(sizeof(ChatLobbyId) != 8)
|
||||
|
@ -401,7 +400,7 @@ bool p3Msgs::resetMessageStandardTagTypes(MsgTagType& tags)
|
|||
/****************************************/
|
||||
bool p3Msgs::sendChat(ChatId destination, std::string msg)
|
||||
{
|
||||
return mChatSrv->sendChat(destination, msg);
|
||||
return mChatSrv->sendChat(destination, msg);
|
||||
}
|
||||
|
||||
uint32_t p3Msgs::getMaxMessageSecuritySize(int type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue