diff options
author | George Hazan <george.hazan@gmail.com> | 2025-06-13 13:29:29 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2025-06-13 13:29:29 +0300 |
commit | 1d2d3f0d17ed27baff22c13a814ee41c58223ffe (patch) | |
tree | abe98bbfbeb2e1b1e709712fdab14e455058518e /protocols/Teams/src/teams_messages.cpp | |
parent | a653b4ad9217a45aad65a7eec71234e652acd446 (diff) |
Teams: fix for fetching conversations list
Diffstat (limited to 'protocols/Teams/src/teams_messages.cpp')
-rw-r--r-- | protocols/Teams/src/teams_messages.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/Teams/src/teams_messages.cpp b/protocols/Teams/src/teams_messages.cpp index cba7809839..beb077eb64 100644 --- a/protocols/Teams/src/teams_messages.cpp +++ b/protocols/Teams/src/teams_messages.cpp @@ -81,7 +81,11 @@ int CTeamsProto::SendServerMsg(MCONTACT hContact, const char *szMessage, int64_t bool bRich = AddBbcodes(str); m_iMessageId++; - CMStringA szUrl = "/users/ME/conversations/" + mir_urlEncode(getId(hContact)) + "/messages"; + CMStringA szChatId(getMStringA(hContact, "ChatId")); + if (szChatId.IsEmpty()) + szChatId = getId(hContact); + + CMStringA szUrl = "/users/ME/conversations/" + mir_urlEncode(szChatId) + "/messages"; if (existingMsgId) szUrl.AppendFormat("/%lld", existingMsgId); |