summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/chat.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2016-07-25 19:20:57 +0000
committerRobert Pösel <robyer@seznam.cz>2016-07-25 19:20:57 +0000
commit9c4ce5c83b1b782d9031896454823e478611f6c2 (patch)
tree3bb2c5fe96c1c60cbb3a217a8c2dcf7bff7c10b9 /protocols/FacebookRM/src/chat.cpp
parentb77891cf703512e3e4d957b1fda69a6a6e22995b (diff)
Facebook: Don't join archived or unsubscribed chatrooms at login
git-svn-id: http://svn.miranda-ng.org/main/trunk@17131 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/chat.cpp')
-rw-r--r--protocols/FacebookRM/src/chat.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp
index 2db4c48b1e..a5a94c2d06 100644
--- a/protocols/FacebookRM/src/chat.cpp
+++ b/protocols/FacebookRM/src/chat.cpp
@@ -304,6 +304,16 @@ INT_PTR FacebookProto::OnJoinChat(WPARAM hContact, LPARAM)
fbc = new facebook_chatroom(thread_id);
LoadChatInfo(fbc);
facy.chat_rooms.insert(std::make_pair(thread_id, fbc));
+
+ // Update loaded info about this chat
+ if (getBool(hContact, FACEBOOK_KEY_CHAT_CAN_REPLY, true) != fbc->can_reply)
+ setByte(hContact, FACEBOOK_KEY_CHAT_CAN_REPLY, fbc->can_reply);
+ if (getBool(hContact, FACEBOOK_KEY_CHAT_READ_ONLY, false) != fbc->read_only)
+ setByte(hContact, FACEBOOK_KEY_CHAT_READ_ONLY, fbc->read_only);
+ if (getBool(hContact, FACEBOOK_KEY_CHAT_IS_ARCHIVED, false) != fbc->is_archived)
+ setByte(hContact, FACEBOOK_KEY_CHAT_IS_ARCHIVED, fbc->is_archived);
+ if (getBool(hContact, FACEBOOK_KEY_CHAT_IS_SUBSCRIBED, true) != fbc->is_subscribed)
+ setByte(hContact, FACEBOOK_KEY_CHAT_IS_SUBSCRIBED, fbc->is_subscribed);
}
// RM TODO: better use check if chatroom exists/is in db/is online... no?