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:
csoler 2011-12-07 00:12:17 +00:00
parent 0086e182ec
commit 816a477806
3 changed files with 21 additions and 6 deletions

View File

@ -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)
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 ;
}
@ -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 << "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.
//
@ -1489,6 +1489,9 @@ bool p3ChatService::acceptLobbyInvite(const ChatLobbyId& lobby_id)
rsicontrol->getNotify().notifyListChange(NOTIFY_LIST_PRIVATE_INCOMING_CHAT, NOTIFY_TYPE_ADD);
// send AKN item
sendLobbyChat(L"[...] joined the lobby",lobby_id) ;
return true ;
}

View File

@ -319,6 +319,12 @@ void FriendsDialog::readChatLobbyInvites()
std::cerr << "Accepting invite to lobby " << (*it).lobby_name << std::endl;
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
rsMsgs->denyLobbyInvite( (*it).lobby_id ) ;

View File

@ -359,11 +359,17 @@ void PopupChatDialog::chatFriend(const std::string &id)
}
std::cerr<<" popup dialog chat friend 1"<<std::endl;
RsPeerDetails detail;
if (!rsPeers->getPeerDetails(id, detail)) {
ChatLobbyId lid ;
if(rsMsgs->isLobbyId(id,lid))
{
getPrivateChat(id, RS_CHAT_OPEN | RS_CHAT_FOCUS);
return ;
}
RsPeerDetails detail;
if (!rsPeers->getPeerDetails(id, detail))
return;
std::string firstId;
if (detail.isOnlyGPGdetail) {