Clear WebAPI when clear chat history in GUI.

Move notifyChatCleared call to p3ChatService
To maintain notify direction.
This commit is contained in:
Phenom 2016-03-31 22:52:53 +02:00
parent ab78825966
commit c6f1cc4e63
14 changed files with 78 additions and 27 deletions

View file

@ -244,6 +244,11 @@ void p3ChatService::sendStatusString(const ChatId& id , const std::string& statu
}
}
void p3ChatService::clearChatLobby(const ChatId& id)
{
RsServer::notify()->notifyChatCleared(id);
}
void p3ChatService::sendChatItem(RsChatItem *item)
{
if(DistantChatService::handleOutgoingItem(item))

View file

@ -95,7 +95,13 @@ public:
* can be used to send 'immediate' status msgs, these status updates are meant for immediate use by peer (not saved by rs)
* e.g currently used to update user when a peer 'is typing' during a chat
*/
void sendStatusString(const ChatId& peer_id,const std::string& status_str) ;
void sendStatusString(const ChatId& id,const std::string& status_str) ;
/**
* @brief clearChatLobby: Signal chat was cleared by GUI.
* @param id: Chat id cleared.
*/
virtual void clearChatLobby(const ChatId& id);
/*!
* send to all peers online