mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 00:25:16 -04:00
Imported chat lobby function from branch v0.5-ChatLobby (merged commits 4682-4739)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4740 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
commit
60bb76e3df
26 changed files with 2445 additions and 188 deletions
|
@ -311,6 +311,28 @@ void FriendsDialog::updateStatusString(const QString& peer_id, const QString& st
|
|||
QTimer::singleShot(5000,this,SLOT(resetStatusBar())) ;
|
||||
}
|
||||
|
||||
void FriendsDialog::readChatLobbyInvites()
|
||||
{
|
||||
std::list<ChatLobbyInvite> invites ;
|
||||
rsMsgs->getPendingChatLobbyInvites(invites) ;
|
||||
|
||||
for(std::list<ChatLobbyInvite>::const_iterator it(invites.begin());it!=invites.end();++it)
|
||||
if(QMessageBox::Ok == QMessageBox::question(NULL,tr("Invitation to chat lobby"),QString::fromStdString((*it).peer_id)+QString(" invites you to chat lobby named ")+QString::fromUtf8((*it).lobby_name.c_str()),QMessageBox::Ok,QMessageBox::Ignore))
|
||||
{
|
||||
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 ) ;
|
||||
}
|
||||
|
||||
void FriendsDialog::updatePeerStatusString(const QString& peer_id,const QString& status_string,bool is_private_chat)
|
||||
{
|
||||
if(is_private_chat)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue