added bool return value to denyLobbyInvite() and marked overriding methods in p3msgs accordingly

This commit is contained in:
csoler 2021-08-29 21:15:52 +02:00
parent 448b00f95a
commit e22c5c9702
5 changed files with 65 additions and 62 deletions

View file

@ -1513,7 +1513,7 @@ ChatLobbyVirtualPeerId DistributedChatService::makeVirtualPeerId(ChatLobbyId lob
}
void DistributedChatService::denyLobbyInvite(const ChatLobbyId& lobby_id)
bool DistributedChatService::denyLobbyInvite(const ChatLobbyId& lobby_id)
{
RsStackMutex stack(mDistributedChatMtx); /********** STACK LOCKED MTX ******/
@ -1525,10 +1525,12 @@ void DistributedChatService::denyLobbyInvite(const ChatLobbyId& lobby_id)
if(it == _lobby_invites_queue.end())
{
std::cerr << " (EE) lobby invite not in cache!!" << std::endl;
return ;
return false;
}
_lobby_invites_queue.erase(it) ;
return true;
}
bool DistributedChatService::joinVisibleChatLobby(const ChatLobbyId& lobby_id,const RsGxsId& gxs_id)

View file

@ -61,7 +61,7 @@ class DistributedChatService
void getChatLobbyList(std::list<ChatLobbyId>& clids) ;
bool getChatLobbyInfo(const ChatLobbyId& id,ChatLobbyInfo& clinfo) ;
bool acceptLobbyInvite(const ChatLobbyId& id,const RsGxsId& identity) ;
void denyLobbyInvite(const ChatLobbyId& id) ;
bool denyLobbyInvite(const ChatLobbyId& id) ;
void getPendingChatLobbyInvites(std::list<ChatLobbyInvite>& invites) ;
void invitePeerToLobby(const ChatLobbyId&, const RsPeerId& peer_id,bool connexion_challenge = false) ;
void unsubscribeChatLobby(const ChatLobbyId& lobby_id) ;