summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-08-15 13:49:37 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-08-15 13:49:37 +0300
commitf52b5cc86d9eff2494902157c8fc0a4e019a3c95 (patch)
tree9f668bf7b89decd53757589d74e476aac81eb451 /protocols/FacebookRM/src/proto.cpp
parentd05dd78157058eea348f0d7666c7c6b0570ef25b (diff)
fixes #799 (Crash on receiving msg in FB group chat)
Diffstat (limited to 'protocols/FacebookRM/src/proto.cpp')
-rw-r--r--protocols/FacebookRM/src/proto.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index c43f9c8d4c..0490710df1 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -1145,19 +1145,13 @@ void FacebookProto::MessageRead(MCONTACT hContact)
wchar_t ttime[64];
wcsftime(ttime, _countof(ttime), L"%X", localtime(&time));
- StatusTextData st = { 0 };
- st.hIcon = IcoLib_GetIconByHandle(GetIconHandle("read"));
+ HICON hIcon = IcoLib_GetIconByHandle(GetIconHandle("read"));
if (isChatRoom(hContact)) {
- // FIXME: Remove this condition when #799 is fixed
- if (!getBool("NoChatMessageReadNotify")) {
- // Load readers names
- ptrW treaders(getWStringA(hContact, FACEBOOK_KEY_MESSAGE_READERS));
- mir_snwprintf(st.tszText, TranslateT("Message read: %s by %s"), ttime, treaders ? treaders : L"???");
- CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hContact, (LPARAM)&st);
- }
- } else if (!ServiceExists(MS_MESSAGESTATE_UPDATE)){
- mir_snwprintf(st.tszText, TranslateT("Message read: %s"), ttime);
- CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hContact, (LPARAM)&st);
+ // Load readers names
+ ptrW treaders(getWStringA(hContact, FACEBOOK_KEY_MESSAGE_READERS));
+ Srmm_SetStatusText(hContact, CMStringW(FORMAT, TranslateT("Message read: %s by %s"), ttime, treaders ? treaders : L"???"), hIcon);
}
+ else if (!ServiceExists(MS_MESSAGESTATE_UPDATE))
+ Srmm_SetStatusText(hContact, CMStringW(FORMAT, TranslateT("Message read: %s"), ttime), hIcon);
}