mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 07:05:26 -04:00
use ChatId instead of virtual peer id for chat lobby popup. Removed a now unused method from rsmsgs interface and DistributedChatService.
This commit is contained in:
parent
c3d422ac86
commit
67e1495d9a
6 changed files with 4 additions and 28 deletions
|
@ -202,7 +202,7 @@ bool DistributedChatService::handleRecvChatLobbyMsgItem(RsChatMsgItem *ci)
|
|||
//name = cli->nick;
|
||||
//popupChatFlag = RS_POPUP_CHATLOBBY;
|
||||
|
||||
RsServer::notify()->AddPopupMessage(RS_POPUP_CHATLOBBY, virtual_peer_id.toStdString(), cli->signature.keyId.toStdString(), cli->message); /* notify private chat message */
|
||||
RsServer::notify()->AddPopupMessage(RS_POPUP_CHATLOBBY, ChatId(cli->lobby_id).toStdString(), cli->signature.keyId.toStdString(), cli->message); /* notify private chat message */
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
@ -339,21 +339,6 @@ void DistributedChatService::locked_printDebugInfo() const
|
|||
std::cerr << " \"" << std::hex << it->first << "\" flags = " << it->second << std::dec << std::endl;
|
||||
}
|
||||
|
||||
bool DistributedChatService::isLobbyId(const RsPeerId& virtual_peer_id,ChatLobbyId& lobby_id)
|
||||
{
|
||||
RsStackMutex stack(mDistributedChatMtx); /********** STACK LOCKED MTX ******/
|
||||
|
||||
std::map<ChatLobbyVirtualPeerId,ChatLobbyId>::const_iterator it(_lobby_ids.find(virtual_peer_id)) ;
|
||||
|
||||
if(it != _lobby_ids.end())
|
||||
{
|
||||
lobby_id = it->second ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
lobby_id = 0;
|
||||
return false ;
|
||||
}
|
||||
bool DistributedChatService::locked_bouncingObjectCheck(RsChatLobbyBouncingObject *obj,const RsPeerId& peer_id,uint32_t lobby_count)
|
||||
{
|
||||
static std::map<std::string, std::list<time_t> > message_counts ;
|
||||
|
|
|
@ -60,7 +60,6 @@ class DistributedChatService
|
|||
// Interface part to communicate with
|
||||
//
|
||||
bool getVirtualPeerId(const ChatLobbyId& lobby_id, RsPeerId& virtual_peer_id) ;
|
||||
bool isLobbyId(const RsPeerId& virtual_peer_id, ChatLobbyId& lobby_id) ;
|
||||
void getChatLobbyList(std::list<ChatLobbyId>& clids) ;
|
||||
bool getChatLobbyInfo(const ChatLobbyId& id,ChatLobbyInfo& clinfo) ;
|
||||
bool acceptLobbyInvite(const ChatLobbyId& id,const RsGxsId& identity) ;
|
||||
|
|
|
@ -464,7 +464,6 @@ virtual void getOwnAvatarData(unsigned char *& data,int& size) = 0 ;
|
|||
/****************************************/
|
||||
|
||||
virtual bool joinVisibleChatLobby(const ChatLobbyId& lobby_id,const RsGxsId& own_id) = 0 ;
|
||||
virtual bool isLobbyId(const RsPeerId& virtual_peer_id,ChatLobbyId& lobby_id) = 0;
|
||||
virtual bool getVirtualPeerId(const ChatLobbyId& lobby_id,RsPeerId& vpid) = 0;
|
||||
virtual void getChatLobbyList(std::list<ChatLobbyId>& cl_list) = 0;
|
||||
virtual bool getChatLobbyInfo(const ChatLobbyId& id,ChatLobbyInfo& info) = 0 ;
|
||||
|
|
|
@ -448,10 +448,6 @@ bool p3Msgs::getVirtualPeerId(const ChatLobbyId& id,RsPeerId& peer_id)
|
|||
{
|
||||
return mChatSrv->getVirtualPeerId(id,peer_id) ;
|
||||
}
|
||||
bool p3Msgs::isLobbyId(const RsPeerId& peer_id,ChatLobbyId& id)
|
||||
{
|
||||
return mChatSrv->isLobbyId(peer_id,id) ;
|
||||
}
|
||||
|
||||
bool p3Msgs::getChatLobbyInfo(const ChatLobbyId& id,ChatLobbyInfo& linfo)
|
||||
{
|
||||
|
|
|
@ -139,7 +139,6 @@ class p3Msgs: public RsMsgs
|
|||
virtual bool joinVisibleChatLobby(const ChatLobbyId& id, const RsGxsId &own_id) ;
|
||||
virtual void getListOfNearbyChatLobbies(std::vector<VisibleChatLobbyRecord>& public_lobbies) ;
|
||||
virtual bool getVirtualPeerId(const ChatLobbyId& id,RsPeerId& vpid) ;
|
||||
virtual bool isLobbyId(const RsPeerId& virtual_peer_id,ChatLobbyId& lobby_id) ;
|
||||
virtual void getChatLobbyList(std::list<ChatLobbyId>& cl_list) ;
|
||||
virtual bool getChatLobbyInfo(const ChatLobbyId& id,ChatLobbyInfo& info) ;
|
||||
virtual void invitePeerToLobby(const ChatLobbyId&, const RsPeerId&) ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue