From f52b5cc86d9eff2494902157c8fc0a4e019a3c95 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 15 Aug 2017 13:49:37 +0300 Subject: fixes #799 (Crash on receiving msg in FB group chat) --- protocols/FacebookRM/src/json.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'protocols/FacebookRM/src/json.cpp') 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::vectorChatIDToHContact(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; } - -- cgit v1.2.3