Skip to content

[WIP] Getting rid of old notify system #174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

csoler
Copy link
Contributor

@csoler csoler commented Jun 7, 2025

No description provided.

@csoler csoler changed the title Getting rid of old notify system [WIP] Getting rid of old notify system Jun 7, 2025
@defnax
Copy link
Contributor

defnax commented Jun 7, 2025

i need a feature for distant chat status to get via rsevent (RS_CHAT_FLAG_CONNEXION_REFUSED)

    if(cs->flags & RS_CHAT_FLAG_CONNEXION_REFUSED)
    {
#ifdef DEBUG_DISTANT_CHAT    
        DISTANT_CHAT_DEBUG() << "(II) Distant chat: received notification that peer refuses conversation." << std::endl;
#endif
        RsServer::notify()->notifyChatStatus(ChatId(DistantChatPeerId(cs->PeerId())),"Connexion refused by distant peer!") ;
    }

@defnax
Copy link
Contributor

defnax commented Jun 7, 2025

void PopupDistantChatDialog::updateDistantChatEvent()
{

	DistantChatPeerInfo tinfo;
	rsMsgs->getDistantChatStatus(_tunnel_id,tinfo) ;

	switch(tinfo.status)
	{
	case RS_DISTANT_CHAT_STATUS_STARTING:
		getChatWidget()->addChatMsg(true, tr("Chat status"), QDateTime::currentDateTime(), QDateTime::currentDateTime()
			, tr("Starting distant chat. Please wait for secure tunnel"), ChatWidget::MSGTYPE_SYSTEM);
	case RS_DISTANT_CHAT_STATUS_UNKNOWN:
		break ;
	case RS_DISTANT_CHAT_STATUS_REMOTELY_CLOSED:
		getChatWidget()->addChatMsg(true, tr("Chat status"), QDateTime::currentDateTime(), QDateTime::currentDateTime()
			, tr("Your partner closed the conversation."), ChatWidget::MSGTYPE_SYSTEM);
		break ;
	case RS_DISTANT_CHAT_STATUS_TUNNEL_DN:
		break;
	case RS_DISTANT_CHAT_STATUS_CAN_TALK:
		getChatWidget()->addChatMsg(true, tr("Chat status"), QDateTime::currentDateTime(), QDateTime::currentDateTime()
			, tr("Tunnel is secured. You can talk!"), ChatWidget::MSGTYPE_SYSTEM);
		getChatWidget()->unblockSending();
		break;
         case RS_DISTANT_CHAT_CONNEXION_REFUSED:
                ui->typingPixmapLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":images/denied-32.png") );
         break;
	}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants