diff options
author | George Hazan <ghazan@miranda.im> | 2023-02-24 16:19:03 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-02-24 16:19:03 +0300 |
commit | 515acdecc964323ed67742c24c96a7b858bf4496 (patch) | |
tree | dd89d58ae39701bd0de53349a31674d467efe718 | |
parent | 8e4a54868c87fe20c1825861d6ed3f66c5927dfa (diff) |
fixes #3216 (WhenWasIt: дни рождения контактов из отключённых учётных записей показываются как дни рождения "Неизвестного контакта")
-rw-r--r-- | plugins/WhenWasIt/src/dlg_handlers.cpp | 3 | ||||
-rw-r--r-- | src/mir_app/src/contacts.cpp | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp index 9089bd83a4..156f5b96f7 100644 --- a/plugins/WhenWasIt/src/dlg_handlers.cpp +++ b/plugins/WhenWasIt/src/dlg_handlers.cpp @@ -167,8 +167,7 @@ class CBirthdaysDlg : public CBasicListDlg int dtb = DaysToBirthday(Today(), year, month, day);
int age = GetContactAge(year, month, day);
- char *szProto = Proto_GetBaseAccountName(hContact);
- PROTOACCOUNT *pAcc = Proto_GetAccount(szProto);
+ PROTOACCOUNT *pAcc = Proto_GetContactAccount(hContact);
wchar_t *ptszAccName = (pAcc == nullptr) ? TranslateT("Unknown") : pAcc->tszAccountName;
if (bAdd) {
diff --git a/src/mir_app/src/contacts.cpp b/src/mir_app/src/contacts.cpp index 376735f87e..55f55b5bff 100644 --- a/src/mir_app/src/contacts.cpp +++ b/src/mir_app/src/contacts.cpp @@ -78,7 +78,9 @@ MIR_APP_DLL(wchar_t*) Contact::GetInfo(int type, MCONTACT hContact, const char * return nullptr;
if (szProto == nullptr)
- szProto = Proto_GetBaseAccountName(hContact);
+ if (auto *pa = Proto_GetContactAccount(hContact))
+ szProto = pa->szModuleName;
+
if (szProto == nullptr)
return nullptr;
|