From 9885bf54f788e831a80c76001340aa68d31d2aaa Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 25 Jan 2023 18:34:51 +0300 Subject: Group chats: ChatRoomID setting replaced with real protocol id --- src/core/stdfile/src/file.cpp | 10 ---------- src/core/stdfile/src/file.h | 2 -- src/core/stdfile/src/filerecvdlg.cpp | 2 +- 3 files changed, 1 insertion(+), 13 deletions(-) (limited to 'src/core/stdfile') diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp index 234f84404f..254cbbebd7 100644 --- a/src/core/stdfile/src/file.cpp +++ b/src/core/stdfile/src/file.cpp @@ -32,16 +32,6 @@ int PFTS_CompareWithTchar(PROTOFILETRANSFERSTATUS* ft, const wchar_t* s, wchar_t static HGENMENU hSRFileMenuItem; -wchar_t* GetContactID(MCONTACT hContact) -{ - char *szProto = Proto_GetBaseAccountName(hContact); - if (Contact::IsGroupChat(hContact, szProto)) - if (wchar_t *theValue = db_get_wsa(hContact, szProto, "ChatRoomID")) - return theValue; - - return Contact::GetInfo(CNF_UNIQUEID, hContact, szProto); -} - static INT_PTR SendFileCommand(WPARAM hContact, LPARAM) { FileSendData fsd; diff --git a/src/core/stdfile/src/file.h b/src/core/stdfile/src/file.h index 2bdddb04e5..60e38c907f 100644 --- a/src/core/stdfile/src/file.h +++ b/src/core/stdfile/src/file.h @@ -120,6 +120,4 @@ HWND FtMgr_Show(bool bForceActivate, bool bFromMenu); void FtMgr_Destroy(); void FtMgr_AddTransfer(FileDlgData *dat); -wchar_t *GetContactID(MCONTACT hContact); - extern HANDLE hDlgSucceeded, hDlgCanceled; diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp index 7a364e210e..b784e09c24 100644 --- a/src/core/stdfile/src/filerecvdlg.cpp +++ b/src/core/stdfile/src/filerecvdlg.cpp @@ -138,7 +138,7 @@ void GetContactReceivedFilesDir(MCONTACT hContact, wchar_t *szDir, int cchDir, B rvaVarsToReplace[0].key.w = L"nick"; rvaVarsToReplace[0].value.w = mir_wstrdup(Clist_GetContactDisplayName(hContact)); rvaVarsToReplace[1].key.w = L"userid"; - rvaVarsToReplace[1].value.w = GetContactID(hContact); + rvaVarsToReplace[1].value.w = Contact::GetInfo(CNF_UNIQUEID, hContact); rvaVarsToReplace[2].key.w = L"proto"; rvaVarsToReplace[2].value.w = mir_a2u(Proto_GetBaseAccountName(hContact)); rvaVarsToReplace[3].key.w = nullptr; -- cgit v1.2.3