summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/communication.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-07-15 15:35:50 +0000
committerRobert Pösel <robyer@seznam.cz>2014-07-15 15:35:50 +0000
commit31576722f7a8fd5c9719852242a2b4e9749830d9 (patch)
treee190a4e42b6b5cbe51d2f9407d4fe79962ee58a5 /protocols/FacebookRM/src/communication.cpp
parentaf9f7df6d22903be7f7a7c8a93d77355bbd7f958 (diff)
Facebook: First phase of chat refactoring
- It loads list of users, their "roles" (myself, friend, user) with friend's names - Fixed some memory leak git-svn-id: http://svn.miranda-ng.org/main/trunk@9809 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/communication.cpp')
-rw-r--r--protocols/FacebookRM/src/communication.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp
index 3faf8da535..8c72bd9be6 100644
--- a/protocols/FacebookRM/src/communication.cpp
+++ b/protocols/FacebookRM/src/communication.cpp
@@ -705,6 +705,15 @@ void facebook_client::clear_notifications()
notifications.clear();
}
+void facebook_client::clear_chatrooms()
+{
+ for (std::map<std::tstring, facebook_chatroom*>::iterator it = chat_rooms.begin(); it != chat_rooms.end();) {
+ delete it->second;
+ it = chat_rooms.erase(it);
+ }
+ chat_rooms.clear();
+}
+
void loginError(FacebookProto *proto, std::string error_str) {
error_str = utils::text::trim(
utils::text::special_expressions_decode(