Disable broadcast chat by default at compile time

This commit is contained in:
Gioacchino Mazzurco 2018-11-20 15:54:24 +01:00
parent cf94037c10
commit 53f8307bee
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
4 changed files with 25 additions and 6 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
}
}