summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/FacebookRM/src/process.cpp')
-rw-r--r--protocols/FacebookRM/src/process.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index 6497145c00..4bc3867d0b 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -878,11 +878,14 @@ void FacebookProto::ReceiveMessages(std::vector<facebook_message> &messages, boo
}
}
break;
- case THREAD_NAME:
- // proto->RenameChat(thread_id.c_str(), msg.data.c_str()); // this don't work, why?
- setStringUtf(hChatContact, FACEBOOK_KEY_NICK, msg.data.c_str());
+ case THREAD_NAME: {
UpdateChat(thread_id.c_str(), NULL, NULL, msg.message_text.c_str());
+
+ std::string chatName = (!msg.data.empty() ? msg.data : GenerateChatName(fbc));
+ // proto->RenameChat(thread_id.c_str(), chatName.c_str()); // this don't work, why?
+ setStringUtf(hChatContact, FACEBOOK_KEY_NICK, chatName.c_str());
break;
+ }
case THREAD_IMAGE:
UpdateChat(thread_id.c_str(), NULL, NULL, msg.message_text.c_str());
break;