improved the logic in distant chat. Now all traffic is referred to by the GXS id of the contact instead of virtual peer id which would change with tunnel route. Work still needed to fix up the GUI

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7687 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-11-16 22:46:18 +00:00
parent b4ee877c64
commit 8480d46eb5
9 changed files with 135 additions and 137 deletions

View file

@ -98,10 +98,9 @@ void ChatDialog::init(const RsPeerId &peerId, const QString &title)
}
uint32_t distant_peer_status ;
RsGxsId distant_chat_gxs_id ;
if(rsMsgs->getDistantChatStatus(peerId,distant_chat_gxs_id,distant_peer_status))
chatflags = RS_CHAT_OPEN | RS_CHAT_FOCUS; // use own flags
if(rsMsgs->getDistantChatStatus(RsGxsId(peerId),distant_peer_status))
chatflags = RS_CHAT_OPEN | RS_CHAT_FOCUS; // use own flags
if (chatflags & RS_CHAT_OPEN) {
if (lobby_id) {
@ -118,8 +117,8 @@ void ChatDialog::init(const RsPeerId &peerId, const QString &title)
} else if(distant_peer_status > 0) {
cd = new PopupDistantChatDialog();
chatDialogs[peerId] = cd;
QString peer_name = cd->getPeerName(peerId) ;
cd->init(peerId, tr("Talking to ")+peer_name+" (GXS id="+QString::fromStdString(distant_chat_gxs_id.toStdString())+")") ;
QString peer_name = cd->getPeerName(peerId) ;
cd->init(peerId, tr("Talking to ")+peer_name+" (GXS id="+QString::fromStdString(peerId.toStdString())+")") ;
} else {
RsPeerDetails sslDetails;
@ -210,10 +209,9 @@ void ChatDialog::init(const RsPeerId &peerId, const QString &title)
return;
}
RsGxsId distant_chat_gxs_id ;
uint32_t distant_peer_status ;
if(rsMsgs->getDistantChatStatus(peerId,distant_chat_gxs_id,distant_peer_status))
if(rsMsgs->getDistantChatStatus(RsGxsId(peerId),distant_peer_status))
{
getChat(peerId, forceFocus ? RS_CHAT_OPEN | RS_CHAT_FOCUS : RS_CHAT_OPEN ); // use own flags
return ;