Merge pull request #1413 from G10h4ck/disable_deprecated_messaging

0.6.5 Disable deprecated messaging
This commit is contained in:
G10h4ck 2018-12-23 12:10:55 +01:00 committed by GitHub
commit 93fed48b05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 114 additions and 48 deletions

View file

@ -848,9 +848,18 @@ bool p3ChatService::handleRecvChatMsgItem(RsChatMsgItem *& ci)
RsServer::notify()->AddPopupMessage(popupChatFlag, ci->PeerId().toStdString(), name, message); /* notify private chat message */
else
{
/* notify public chat message */
RsServer::notify()->AddPopupMessage(RS_POPUP_GROUPCHAT, ci->PeerId().toStdString(), "", message);
RsServer::notify()->AddFeedItem(RS_FEED_ITEM_CHAT_NEW, ci->PeerId().toStdString(), message, "");
#ifdef RS_DIRECT_CHAT
/* notify public chat message */
RsServer::notify()->AddPopupMessage(
RS_POPUP_GROUPCHAT,
ci->PeerId().toStdString(), "", message );
RsServer::notify()->AddFeedItem(
RS_FEED_ITEM_CHAT_NEW,
ci->PeerId().toStdString(), message, "" );
#else // def RS_DIRECT_CHAT
/* Ignore deprecated direct node broadcast chat messages */
return false;
#endif
}
}