diff options
author | George Hazan <george.hazan@gmail.com> | 2023-09-18 18:14:53 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-09-18 18:14:53 +0300 |
commit | 78c5dd9a8648dba7ca09f59b4b7460610c6ff3a6 (patch) | |
tree | 0a49a7e53e8ba05f501f46dd6ed36e355b49158b /protocols/Telegram/src/proto.h | |
parent | 41e677d44f0efc241bf484252af6de64b0d00a6c (diff) |
Telegram: ability to add custom chat reactions using NewHistory
Diffstat (limited to 'protocols/Telegram/src/proto.h')
-rw-r--r-- | protocols/Telegram/src/proto.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/Telegram/src/proto.h b/protocols/Telegram/src/proto.h index 27394a241c..a4bfc440d2 100644 --- a/protocols/Telegram/src/proto.h +++ b/protocols/Telegram/src/proto.h @@ -95,6 +95,11 @@ struct TG_USER : public MZeroedObject chatId = (isGroupChat) ? -1 : id; } + ~TG_USER() + { + delete pReactions; + } + int64_t id, chatId; MCONTACT hContact; bool isGroupChat, bLoadMembers; @@ -103,6 +108,7 @@ struct TG_USER : public MZeroedObject time_t m_timer1 = 0, m_timer2 = 0; SESSION_INFO *m_si = nullptr; TD::chatNotificationSettings notificationSettings; + OBJLIST<char> *pReactions = nullptr; CMStringW getDisplayName() const; }; @@ -145,6 +151,7 @@ struct TG_OWN_MESSAGE class CTelegramProto : public PROTO<CTelegramProto> { friend class CForwardDlg; + friend class CReactionsDlg; friend class CAddPhoneContactDlg; class CProtoImpl @@ -236,6 +243,7 @@ class CTelegramProto : public PROTO<CTelegramProto> void ProcessChatLastMessage(TD::updateChatLastMessage *pObj); void ProcessChatNotification(TD::updateChatNotificationSettings *pObj); void ProcessChatPosition(TD::updateChatPosition *pObj); + void ProcessChatReactions(TD::updateChatAvailableReactions *); void ProcessConnectionState(TD::updateConnectionState *pObj); void ProcessDeleteMessage(TD::updateDeleteMessages *pObj); void ProcessFile(TD::updateFile *pObj); @@ -302,7 +310,7 @@ class CTelegramProto : public PROTO<CTelegramProto> MCONTACT GetRealContact(const TG_USER *pUser); // Menus - HGENMENU hmiForward; + HGENMENU hmiForward, hmiReaction; void InitMenus(); |