diff options
author | George Hazan <george.hazan@gmail.com> | 2024-09-17 18:12:37 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-09-17 18:12:37 +0300 |
commit | 547f009bb123e449d65348d77ea3b96ea34f6a91 (patch) | |
tree | ae9fedfaee4791a5507d9d5872e82685bfd20698 | |
parent | e3b782f9cd9344b2a0cb404ab563583f3800081e (diff) |
fixes #4623 (SkypeWeb: поддержать чат с "самим собой")
-rw-r--r-- | protocols/SkypeWeb/src/skype_contacts.cpp | 12 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.h | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp index e5e6038ba5..1e8bcfb3ed 100644 --- a/protocols/SkypeWeb/src/skype_contacts.cpp +++ b/protocols/SkypeWeb/src/skype_contacts.cpp @@ -151,10 +151,20 @@ void CSkypeProto::LoadContactList(MHttpResponse *response, AsyncHttpRequest*) continue;
MCONTACT hContact = AddContact(szSkypeId, nullptr);
+ if (szSkypeId == "28:e7a9407c-2467-4a04-9546-70081f4ea80d")
+ m_hMyContact = hContact;
std::string displayName = item["display_name"].as_string();
- if (!displayName.empty())
+ if (!displayName.empty()) {
+ if (m_hMyContact == hContact) {
+ displayName = getMStringU("Nick");
+ displayName += " ";
+ displayName += TranslateU("(You)");
+
+ setWord(hContact, "Status", ID_STATUS_ONLINE);
+ }
setUString(hContact, "Nick", displayName.c_str());
+ }
if (item["authorized"].as_bool()) {
delSetting(hContact, "Auth");
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index ced2d6771b..de73e6be3d 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -124,6 +124,7 @@ public: int m_iPollingId;
ptrA m_szApiToken, m_szToken, m_szId, m_szOwnSkypeId;
CMStringA m_szSkypename, m_szMyname;
+ MCONTACT m_hMyContact;
__forceinline CMStringA getId(MCONTACT hContact) {
return getMStringA(hContact, SKYPE_SETTINGS_ID);
|