summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/chat.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2017-03-05 09:05:37 +0100
committerRobert Pösel <robyer@seznam.cz>2017-03-05 09:05:37 +0100
commit3f04f6768745e5fe08cd7b681d48097536980c77 (patch)
tree575f2548fad65730883ae0de54da97ce75438ba4 /protocols/FacebookRM/src/chat.cpp
parentd057552cc40769f6ba988a9c7a55957dea2e7e2a (diff)
Facebook: Remove useless optimizations
I was told that db driver checks if value isn't same before writing it.
Diffstat (limited to 'protocols/FacebookRM/src/chat.cpp')
-rw-r--r--protocols/FacebookRM/src/chat.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp
index 65eadd0498..c645140442 100644
--- a/protocols/FacebookRM/src/chat.cpp
+++ b/protocols/FacebookRM/src/chat.cpp
@@ -285,14 +285,10 @@ INT_PTR FacebookProto::OnJoinChat(WPARAM hContact, LPARAM)
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);
+ setByte(hContact, FACEBOOK_KEY_CHAT_CAN_REPLY, fbc->can_reply);
+ setByte(hContact, FACEBOOK_KEY_CHAT_READ_ONLY, fbc->read_only);
+ setByte(hContact, FACEBOOK_KEY_CHAT_IS_ARCHIVED, fbc->is_archived);
+ setByte(hContact, FACEBOOK_KEY_CHAT_IS_SUBSCRIBED, fbc->is_subscribed);
}
// RM TODO: better use check if chatroom exists/is in db/is online... no?