summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/json.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/json.cpp
parentd05dd78157058eea348f0d7666c7c6b0570ef25b (diff)
fixes #799 (Crash on receiving msg in FB group chat)
Diffstat (limited to 'protocols/FacebookRM/src/json.cpp')
-rw-r--r--protocols/FacebookRM/src/json.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp
index 90ed0dd3cf..66254354b2 100644
--- a/protocols/FacebookRM/src/json.cpp
+++ b/protocols/FacebookRM/src/json.cpp
@@ -835,12 +835,10 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vector<faceboo
MCONTACT hChatContact = proto->ChatIDToHContact(tid);
ptrW name(mir_utf8decodeW(participant->second.nick.c_str()));
- if (st_.as_int() == 1) {
- StatusTextData st = { 0 };
- mir_snwprintf(st.tszText, TranslateT("%s is typing a message..."), name);
- CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact, (LPARAM)&st);
- }
- else CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact);
+ if (st_.as_int() == 1)
+ Srmm_SetStatusText(hChatContact, CMStringW(FORMAT, TranslateT("%s is typing a message..."), name));
+ else
+ Srmm_SetStatusText(hChatContact, nullptr);
// TODO: support proper MS_PROTO_CONTACTISTYPING service for chatrooms (when it will be implemented)
}
@@ -1459,4 +1457,3 @@ int facebook_json_parser::parse_messages_count(std::string *data, int *messagesC
return EXIT_SUCCESS;
}
-