summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_chatrooms.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb/src/skype_chatrooms.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_chatrooms.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp
index 32299ec583..8c2f8df693 100644
--- a/protocols/SkypeWeb/src/skype_chatrooms.cpp
+++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp
@@ -290,7 +290,8 @@ void CSkypeProto::OnChatEvent(const JSONNode &node)
std::string messageType = node["messagetype"].as_string();
if (messageType == "Text" || messageType == "RichText")
{
- AddMessageToChat(_A2T(szConversationName), _A2T(szFromSkypename), strContent.c_str(), nEmoteOffset != NULL, nEmoteOffset, timestamp);
+ ptrA szClearedContent(messageType == "RichText" ? RemoveHtml(strContent.c_str()) : mir_strdup(strContent.c_str()));
+ AddMessageToChat(_A2T(szConversationName), _A2T(szFromSkypename), szClearedContent, nEmoteOffset != NULL, nEmoteOffset, timestamp);
}
else if (messageType == "ThreadActivity/AddMember")
{
@@ -436,19 +437,17 @@ void CSkypeProto::AddMessageToChat(const TCHAR *chat_id, const TCHAR *from, cons
gce.time = timestamp;
gce.ptszUID = from;
- ptrA szHtml(RemoveHtml(content));
-
- CMString tszHtml(ptrT(mir_utf8decodeT(szHtml)));
- tszHtml.Replace(L"%", L"%%");
+ CMString tszText(ptrT(mir_utf8decodeT(content)));
+ tszText.Replace(L"%", L"%%");
if (!isAction)
{
- gce.ptszText = tszHtml;
+ gce.ptszText = tszText;
gce.dwFlags = GCEF_ADDTOLOG;
}
else
{
- gce.ptszText = &(tszHtml.GetBuffer())[emoteOffset];
+ gce.ptszText = &(tszText.GetBuffer())[emoteOffset];
}
if (isLoading) gce.dwFlags = GCEF_NOTNOTIFY;