mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 16:09:35 -05:00
bug corrections
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-ChatLobby@4712 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0086e182ec
commit
816a477806
@ -1303,11 +1303,11 @@ bool p3ChatService::recvLobbyChat(RsChatLobbyMsgItem *item)
|
|||||||
for(std::set<std::string>::const_iterator it(lobby.participating_friends.begin());it!=lobby.participating_friends.end();++it)
|
for(std::set<std::string>::const_iterator it(lobby.participating_friends.begin());it!=lobby.participating_friends.end();++it)
|
||||||
if((*it)!=item->PeerId() && mLinkMgr->isOnline(*it))
|
if((*it)!=item->PeerId() && mLinkMgr->isOnline(*it))
|
||||||
{
|
{
|
||||||
RsChatLobbyMsgItem *item = new RsChatLobbyMsgItem(*item) ; // copy almost everything
|
RsChatLobbyMsgItem *item2 = new RsChatLobbyMsgItem(*item) ; // copy almost everything
|
||||||
|
|
||||||
item->PeerId(*it) ;
|
item2->PeerId(*it) ;
|
||||||
|
|
||||||
sendItem(item);
|
sendItem(item2);
|
||||||
}
|
}
|
||||||
return true ;
|
return true ;
|
||||||
}
|
}
|
||||||
@ -1318,7 +1318,7 @@ bool p3ChatService::sendLobbyChat(const std::wstring& msg, const ChatLobbyId& lo
|
|||||||
|
|
||||||
std::cerr << "Sending chat lobby message to lobby " << lobby_id << std::endl;
|
std::cerr << "Sending chat lobby message to lobby " << lobby_id << std::endl;
|
||||||
std::cerr << "msg:" << std::endl;
|
std::cerr << "msg:" << std::endl;
|
||||||
std::cerr << msg.c_str() << std::endl;
|
std::wcerr << msg << std::endl;
|
||||||
|
|
||||||
// get a pointer to the info for that chat lobby.
|
// get a pointer to the info for that chat lobby.
|
||||||
//
|
//
|
||||||
@ -1489,6 +1489,9 @@ bool p3ChatService::acceptLobbyInvite(const ChatLobbyId& lobby_id)
|
|||||||
|
|
||||||
rsicontrol->getNotify().notifyListChange(NOTIFY_LIST_PRIVATE_INCOMING_CHAT, NOTIFY_TYPE_ADD);
|
rsicontrol->getNotify().notifyListChange(NOTIFY_LIST_PRIVATE_INCOMING_CHAT, NOTIFY_TYPE_ADD);
|
||||||
|
|
||||||
|
// send AKN item
|
||||||
|
|
||||||
|
sendLobbyChat(L"[...] joined the lobby",lobby_id) ;
|
||||||
return true ;
|
return true ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -319,6 +319,12 @@ void FriendsDialog::readChatLobbyInvites()
|
|||||||
std::cerr << "Accepting invite to lobby " << (*it).lobby_name << std::endl;
|
std::cerr << "Accepting invite to lobby " << (*it).lobby_name << std::endl;
|
||||||
|
|
||||||
rsMsgs->acceptLobbyInvite( (*it).lobby_id ) ;
|
rsMsgs->acceptLobbyInvite( (*it).lobby_id ) ;
|
||||||
|
|
||||||
|
std::string vpid ;
|
||||||
|
if(rsMsgs->getVirtualPeerId( (*it).lobby_id,vpid ) )
|
||||||
|
PopupChatDialog::chatFriend(vpid) ;
|
||||||
|
else
|
||||||
|
std::cerr << "No lobby known with id 0x" << std::hex << (*it).lobby_id << std::dec << std::endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
rsMsgs->denyLobbyInvite( (*it).lobby_id ) ;
|
rsMsgs->denyLobbyInvite( (*it).lobby_id ) ;
|
||||||
|
@ -359,10 +359,16 @@ void PopupChatDialog::chatFriend(const std::string &id)
|
|||||||
}
|
}
|
||||||
std::cerr<<" popup dialog chat friend 1"<<std::endl;
|
std::cerr<<" popup dialog chat friend 1"<<std::endl;
|
||||||
|
|
||||||
|
ChatLobbyId lid ;
|
||||||
|
if(rsMsgs->isLobbyId(id,lid))
|
||||||
|
{
|
||||||
|
getPrivateChat(id, RS_CHAT_OPEN | RS_CHAT_FOCUS);
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
RsPeerDetails detail;
|
RsPeerDetails detail;
|
||||||
if (!rsPeers->getPeerDetails(id, detail)) {
|
if (!rsPeers->getPeerDetails(id, detail))
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
std::string firstId;
|
std::string firstId;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user