diff options
Diffstat (limited to 'protocols/Teams/src')
| -rw-r--r-- | protocols/Teams/src/teams_profile.cpp | 13 | ||||
| -rw-r--r-- | protocols/Teams/src/teams_proto.h | 2 | ||||
| -rw-r--r-- | protocols/Teams/src/teams_server.cpp | 10 |
3 files changed, 12 insertions, 13 deletions
diff --git a/protocols/Teams/src/teams_profile.cpp b/protocols/Teams/src/teams_profile.cpp index 29a04937c6..cf257aa839 100644 --- a/protocols/Teams/src/teams_profile.cpp +++ b/protocols/Teams/src/teams_profile.cpp @@ -100,8 +100,9 @@ void CTeamsProto::UpdateProfileAvatar(const JSONNode &root, MCONTACT hContact) } } -//{"firstname":"Echo \/ Sound Test Service", "lastname" : null, "birthday" : null, "gender" : null, "country" : null, "city" : null, "language" : null, "homepage" : null, "about" : null, "province" : null, "jobtitle" : null, "emails" : [], "phoneMobile" : null, "phoneHome" : null, "phoneOffice" : null, "mood" : null, "richMood" : null, "avatarUrl" : null, "username" : "echo123"} -void CTeamsProto::LoadProfile(MHttpResponse *response, AsyncHttpRequest *pRequest) +///////////////////////////////////////////////////////////////////////////////////////// + +void CTeamsProto::OnGetProfileInfo(MHttpResponse *response, AsyncHttpRequest *pRequest) { MCONTACT hContact = (DWORD_PTR)pRequest->pUserInfo; @@ -145,3 +146,11 @@ void CTeamsProto::LoadProfile(MHttpResponse *response, AsyncHttpRequest *pReques ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, 0); } + +void CTeamsProto::GetProfileInfo(MCONTACT hContact) +{ + auto *pReq = new AsyncHttpRequest(REQUEST_GET, HOST_API, 0, &CTeamsProto::OnGetProfileInfo); + pReq->m_szUrl.AppendFormat("/users/%s/profile", (hContact == 0) ? "self" : mir_urlEncode(getId(hContact))); + pReq->pUserInfo = (void *)hContact; + PushRequest(pReq); +} diff --git a/protocols/Teams/src/teams_proto.h b/protocols/Teams/src/teams_proto.h index fdbee4d39e..d47e020a8e 100644 --- a/protocols/Teams/src/teams_proto.h +++ b/protocols/Teams/src/teams_proto.h @@ -203,7 +203,7 @@ public: void OnGetChatInfo(MHttpResponse *response, AsyncHttpRequest *pRequest); void OnGetChatMembers(MHttpResponse *response, AsyncHttpRequest *pRequest); - void LoadProfile(MHttpResponse *response, AsyncHttpRequest *pRequest); + void OnGetProfileInfo(MHttpResponse *response, AsyncHttpRequest *pRequest); static INT_PTR __cdecl GlobalParseSkypeUriService(WPARAM, LPARAM lParam); diff --git a/protocols/Teams/src/teams_server.cpp b/protocols/Teams/src/teams_server.cpp index ef7699d5c7..dc51e1ed67 100644 --- a/protocols/Teams/src/teams_server.cpp +++ b/protocols/Teams/src/teams_server.cpp @@ -174,13 +174,3 @@ void CTeamsProto::CreateContactSubscription() pReq->m_szParam = node.write().c_str(); PushRequest(pReq); } - -///////////////////////////////////////////////////////////////////////////////////////// - -void CTeamsProto::GetProfileInfo(MCONTACT hContact) -{ - auto *pReq = new AsyncHttpRequest(REQUEST_GET, HOST_API, 0, &CTeamsProto::LoadProfile); - pReq->m_szUrl.AppendFormat("/users/%s/profile", (hContact == 0) ? "self" : mir_urlEncode(getId(hContact))); - pReq->pUserInfo = (void *)hContact; - PushRequest(pReq); -} |
