From 335f68b1c98e92e448e11380d62d6c8df8533c92 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 21 Nov 2023 13:50:52 +0300 Subject: Telegram: new extra icon for bots --- protocols/Telegram/src/main.cpp | 1 + protocols/Telegram/src/resource.h | 3 ++- protocols/Telegram/src/server.cpp | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'protocols/Telegram/src') diff --git a/protocols/Telegram/src/main.cpp b/protocols/Telegram/src/main.cpp index ee1aa1ecee..411a286ffc 100644 --- a/protocols/Telegram/src/main.cpp +++ b/protocols/Telegram/src/main.cpp @@ -43,6 +43,7 @@ static IconItem iconList[] = { LPGEN("Telegram Premium user"), "premuim", IDI_PREMIUM }, { LPGEN("Forward"), "forward", IDI_FORWARD }, { LPGEN("Reaction"), "reaction", IDI_REACTION }, + { LPGEN("Bot"), "bot", IDI_BOT }, }; int CMPlugin::Load() diff --git a/protocols/Telegram/src/resource.h b/protocols/Telegram/src/resource.h index 6a15eac64e..a1f348c2a0 100644 --- a/protocols/Telegram/src/resource.h +++ b/protocols/Telegram/src/resource.h @@ -12,6 +12,7 @@ #define IDD_ADD_PHONE 107 #define IDI_REACTION 108 #define IDD_REACTIONS 109 +#define IDI_BOT 110 #define IDC_PHONE 1001 #define IDC_DEFGROUP 1002 #define IDC_HIDECHATS 1003 @@ -37,7 +38,7 @@ // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 109 +#define _APS_NEXT_RESOURCE_VALUE 111 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1019 #define _APS_NEXT_SYMED_VALUE 101 diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp index 751fd69a94..80c25d9b95 100644 --- a/protocols/Telegram/src/server.cpp +++ b/protocols/Telegram/src/server.cpp @@ -930,6 +930,8 @@ void CTelegramProto::ProcessUser(TD::updateUser *pObj) if (pUser->is_premium_) ExtraIcon_SetIconByName(g_plugin.m_hIcon, pu->hContact, "tg_premium"); + else if (typeID == TD::userTypeBot::ID) + ExtraIcon_SetIconByName(g_plugin.m_hIcon, pu->hContact, "tg_bot"); else ExtraIcon_SetIconByName(g_plugin.m_hIcon, pu->hContact, nullptr); -- cgit v1.2.3