summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-04-22 12:27:27 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-04-22 12:27:33 +0300
commitec44091523501a7f4007c21977e0638ca8e42434 (patch)
treed435904828ca01325cfb5a6a060a0df8a1fe6d6d
parentd8b2f3bc516bb22980381595961f6020e3d44b96 (diff)
minor code cleaning
-rw-r--r--protocols/Teams/src/teams_profile.cpp13
-rw-r--r--protocols/Teams/src/teams_proto.h2
-rw-r--r--protocols/Teams/src/teams_server.cpp10
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);
-}