diff options
Diffstat (limited to 'protocols/ICQ-WIM/src/server.cpp')
-rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index 5d758f6b11..3dca2f8a6c 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -439,6 +439,10 @@ MCONTACT CIcqProto::ParseBuddyInfo(const JSONNode &buddy, MCONTACT hContact, boo Json2string(hContact, it, "country", "Country", bIsPartial);
}
}
+ else {
+ Json2string(hContact, buddy, "firstName", "FirstName", bIsPartial);
+ Json2string(hContact, buddy, "lastName", "LastName", bIsPartial);
+ }
CMStringW str = buddy["statusMsg"].as_mstring();
if (str.IsEmpty())
@@ -1407,6 +1411,22 @@ void CIcqProto::OnSearchResults(MHttpResponse *pReply, AsyncHttpRequest *pReq) }
/////////////////////////////////////////////////////////////////////////////////////////
+
+void CIcqProto::PatchProfileInfo(const char *pszVariable, const wchar_t *pwszValue)
+{
+ if (!mir_wstrlen(pwszValue))
+ return;
+
+ auto *pReq = new AsyncRapiRequest(this, "/profile/update", nullptr, 1);
+ pReq->params << WCHAR_PARAM(pszVariable, pwszValue);
+ Push(pReq);
+
+ char *buf = NEWSTR_ALLOCA(pszVariable);
+ buf[0] = _toupper(buf[0]);
+ setWString(buf, pwszValue);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
// Send message
void CIcqProto::OnSendMessage(MHttpResponse *pReply, AsyncHttpRequest *pReq)
|