summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_chat_int.h1
-rw-r--r--protocols/Discord/src/guilds.cpp4
-rw-r--r--src/mir_app/src/chat_manager.cpp5
3 files changed, 3 insertions, 7 deletions
diff --git a/include/m_chat_int.h b/include/m_chat_int.h
index 7189facdca..a1e02fb065 100644
--- a/include/m_chat_int.h
+++ b/include/m_chat_int.h
@@ -279,7 +279,6 @@ struct CHAT_MANAGER
void (*MM_IconsChanged)(void);
BOOL (*MM_RemoveAll)(void);
- STATUSINFO* (*TM_FindStatus)(STATUSINFO *pStatusList, const wchar_t *pszStatus);
BOOL (*TM_RemoveAll)(STATUSINFO** pStatusList);
int (*UM_CompareItem)(const USERINFO *u1, const USERINFO *u2);
diff --git a/protocols/Discord/src/guilds.cpp b/protocols/Discord/src/guilds.cpp
index 19210b4cbc..160a152c0d 100644
--- a/protocols/Discord/src/guilds.cpp
+++ b/protocols/Discord/src/guilds.cpp
@@ -357,12 +357,10 @@ void CDiscordProto::AddGuildUser(CDiscordGuild *pGuild, const CDiscordGuildMembe
break;
}
- auto *pStatus = g_chatApi.TM_FindStatus(pGuild->pParentSi->pStatuses, pUser.wszRole);
-
wchar_t wszUserId[100];
_i64tow_s(pUser.userId, wszUserId, _countof(wszUserId), 10);
- auto *pu = g_chatApi.UM_AddUser(pGuild->pParentSi, wszUserId, pUser.wszNick, (pStatus) ? pStatus->iStatus : 0);
+ auto *pu = g_chatApi.UM_AddUser(pGuild->pParentSi, wszUserId, pUser.wszNick, 0);
pu->iStatusEx = flags;
if (pUser.userId == m_ownId)
pGuild->pParentSi->pMe = pu;
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp
index 76c7ee93e4..9b12ed1a45 100644
--- a/src/mir_app/src/chat_manager.cpp
+++ b/src/mir_app/src/chat_manager.cpp
@@ -359,7 +359,7 @@ static HICON SM_GetStatusIcon(SESSION_INFO *si, USERINFO *ui)
return nullptr;
auto *pStatuses = si->getStatuses();
- STATUSINFO *ti = g_chatApi.TM_FindStatus(pStatuses, TM_WordToString(pStatuses, ui->Status));
+ STATUSINFO *ti = TM_FindStatus(pStatuses, TM_WordToString(pStatuses, ui->Status));
if (ti != nullptr)
return g_chatApi.hStatusIcons[ti->iIconIndex];
@@ -649,7 +649,7 @@ STATUSINFO* TM_AddStatus(STATUSINFO **ppStatusList, const wchar_t *pszStatus, in
if (!ppStatusList || !pszStatus)
return nullptr;
- if (!g_chatApi.TM_FindStatus(*ppStatusList, pszStatus)) {
+ if (!TM_FindStatus(*ppStatusList, pszStatus)) {
STATUSINFO *node = (STATUSINFO*)mir_calloc(sizeof(STATUSINFO));
replaceStrW(node->pszGroup, pszStatus);
node->iIconIndex = *iCount;
@@ -770,7 +770,6 @@ static void ResetApi()
g_chatApi.MM_IconsChanged = ::MM_IconsChanged;
g_chatApi.MM_RemoveAll = ::MM_RemoveAll;
- g_chatApi.TM_FindStatus = ::TM_FindStatus;
g_chatApi.TM_RemoveAll = ::TM_RemoveAll;
g_chatApi.UM_AddUser = ::UM_AddUser;