diff options
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r-- | protocols/SkypeWeb/src/requests/messages.h | 6 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_messages.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/protocols/SkypeWeb/src/requests/messages.h b/protocols/SkypeWeb/src/requests/messages.h index 198930fd65..1f4d4bc87d 100644 --- a/protocols/SkypeWeb/src/requests/messages.h +++ b/protocols/SkypeWeb/src/requests/messages.h @@ -42,7 +42,7 @@ public: class SendActionRequest : public HttpRequest
{
public:
- SendActionRequest(const char *regToken, const char *username, time_t timestamp, const char *message, const char *server = SKYPE_ENDPOINTS_HOST) :
+ SendActionRequest(const char *regToken, const char *username, const char *selfusername, time_t timestamp, const char *message, const char *server = SKYPE_ENDPOINTS_HOST) :
HttpRequest(REQUEST_POST, FORMAT, "%s/v1/users/ME/conversations/8:%s/messages", server, username)
{
Headers
@@ -51,14 +51,14 @@ public: << CHAR_VALUE("Content-Type", "application/json; charset=UTF-8");
CMStringA content;
- content.AppendFormat("%s %s", username, message);
+ content.AppendFormat("%s %s", selfusername, message);
JSONNode node(JSON_NODE);
node.push_back(JSONNode("clientmessageid", (long)timestamp));
node.push_back(JSONNode("messagetype", "RichText"));
node.push_back(JSONNode("contenttype", "text"));
node.push_back(JSONNode("content", content));
- node.push_back(JSONNode("skypeemoteoffset", (int)(mir_strlen(username) + 1)));
+ node.push_back(JSONNode("skypeemoteoffset", (int)(mir_strlen(selfusername) + 1)));
Body << VALUE(node.write().c_str());
}
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index 5dbfbb78e0..8f74578b4f 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -76,7 +76,7 @@ int CSkypeProto::OnSendMessage(MCONTACT hContact, int, const char *szMessage) delete[] buff;*/
if (strncmp(szMessage, "/me ", 4) == 0)
- SendRequest(new SendActionRequest(m_szRegToken, m_szSelfSkypeName, param->hMessage, &szMessage[4], m_szServer), &CSkypeProto::OnMessageSent, param);
+ SendRequest(new SendActionRequest(m_szRegToken, username, m_szSelfSkypeName, param->hMessage, &szMessage[4], m_szServer), &CSkypeProto::OnMessageSent, param);
else
SendRequest(new SendMessageRequest(m_szRegToken, username, param->hMessage, szMessage, m_szServer), &CSkypeProto::OnMessageSent, param);
|