mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 22:21:09 -04:00
- added history parameters for chat lobbies
- added max storage time for items in chat history. Avoids filling up the history with chat from volatile peers. - worked out the layout in config->ChatPage in a more compact design and added help - set the max size of chat messages to 6000 bytes instead of 2000 which was a bit too low - default max number of lobby messages saved in each lobby is 20. Avoids flooding for peers who havn't configured it yet. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6770 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f25f46dffb
commit
e21d869006
11 changed files with 544 additions and 218 deletions
|
@ -1151,12 +1151,12 @@ void p3ChatService::handleRecvChatAvatarItem(RsChatAvatarItem *ca)
|
|||
bool p3ChatService::checkForMessageSecurity(RsChatMsgItem *ci)
|
||||
{
|
||||
// Remove too big messages
|
||||
if (ci->message.length() > 2000 && (ci->chatFlags & RS_CHAT_FLAG_LOBBY))
|
||||
if (ci->message.length() > 6000 && (ci->chatFlags & RS_CHAT_FLAG_LOBBY))
|
||||
{
|
||||
wchar_t tmp[300];
|
||||
mbstowcs(tmp, rsPeers->getPeerName(ci->PeerId()).c_str(), 299);
|
||||
|
||||
ci->message = std::wstring(L"**** Security warning: Message bigger than 2000 characters, coming from id ") + tmp + L", dropped. ****";
|
||||
ci->message = std::wstring(L"**** Security warning: Message bigger than 6000 characters, forwarded to you by ") + tmp + L", dropped. ****";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2892,7 +2892,7 @@ void p3ChatService::unsubscribeChatLobby(const ChatLobbyId& id)
|
|||
|
||||
// remove history
|
||||
|
||||
mHistoryMgr->clear(it->second.virtual_peer_id);
|
||||
//mHistoryMgr->clear(it->second.virtual_peer_id);
|
||||
|
||||
// remove lobby information
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue