diff options
| author | George Hazan <george.hazan@gmail.com> | 2025-06-05 13:22:16 +0300 |
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2025-06-05 13:22:21 +0300 |
| commit | e4ab7cd45a4c45e81b8b862be68951da22334dd9 (patch) | |
| tree | f3d83cfa5c391388fd6adc35997217b0586af774 /protocols | |
| parent | 194b2980ac4506b428aedc245fb26d6f5ef116c3 (diff) | |
fixes #5044 (Teams: Именованные групчаты "на двоих" должны отображаться как групчаты, а не как личка)
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/Teams/src/teams_history.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/protocols/Teams/src/teams_history.cpp b/protocols/Teams/src/teams_history.cpp index 78221846cf..6930e90382 100644 --- a/protocols/Teams/src/teams_history.cpp +++ b/protocols/Teams/src/teams_history.cpp @@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. void CTeamsProto::RefreshConversations() { auto *pReq = new AsyncHttpRequest(REQUEST_GET, HOST_DEFAULT, "/users/ME/conversations", &CTeamsProto::OnSyncConversations); - pReq << INT_PARAM("startTime", getLastTime(0)) << INT_PARAM("pageSize", 100) + pReq << INT64_PARAM("startTime", getLastTime(0)) << INT_PARAM("pageSize", 100) << CHAR_PARAM("view", "msnp24Equivalent") << CHAR_PARAM("targetType", "Passport|Skype|Lync|Thread|PSTN|Agent"); PushRequest(pReq); @@ -58,8 +58,21 @@ void CTeamsProto::OnSyncConversations(MHttpResponse *response, AsyncHttpRequest case 19: { auto &props = it["threadProperties"]; - if (!props["lastleaveat"]) - StartChatRoom(it["id"].as_mstring(), props["topic"].as_mstring(), props["version"].as_string().c_str()); + CMStringA szType = props["productThreadType"].as_mstring(), szChatType; + + int idx = szSkypename.ReverseFind('@'); + if (idx != -1) + szChatType = szSkypename.Mid(idx + 1); + + if (szType == "Chat" || szChatType == "thread.skype") { + if (!props["lastleaveat"]) + StartChatRoom(it["id"].as_mstring(), props["topic"].as_mstring(), props["version"].as_string().c_str()); + } + else if (szType == "OneToOneChat") { + hContact = FindContact(it["properties"]["addedBy"].as_string().c_str()); + if (hContact) + setString(hContact, "ChatId", szSkypename); + } } FetchMissingHistory(it, hContact); break; |
