summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/proto.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-06-03 18:31:18 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-06-03 18:31:18 +0300
commit6e83622d2af1cec3c759f4cff6efe4df2fe3328c (patch)
tree67a6224019f59e38d6496d32eefd72188bdbc61c /protocols/Telegram/src/proto.h
parent6cade9acbd5067761f068ba819008eb3084239b4 (diff)
Telegram: fix for a trick with temporary message id that led to duplicated messages
Diffstat (limited to 'protocols/Telegram/src/proto.h')
-rw-r--r--protocols/Telegram/src/proto.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/protocols/Telegram/src/proto.h b/protocols/Telegram/src/proto.h
index e03405560a..7181a92bce 100644
--- a/protocols/Telegram/src/proto.h
+++ b/protocols/Telegram/src/proto.h
@@ -125,6 +125,19 @@ struct TG_BASIC_GROUP
TD::object_ptr<TD::basicGroup> group;
};
+struct TG_OWN_MESSAGE
+{
+ TG_OWN_MESSAGE(MCONTACT _1, HANDLE _2, int64_t _3) :
+ hContact(_1),
+ hAck(_2),
+ tmpMsgId(_3)
+ {}
+
+ int64_t tmpMsgId;
+ HANDLE hAck;
+ MCONTACT hContact;
+};
+
class CTelegramProto : public PROTO<CTelegramProto>
{
friend class CForwardDlg;
@@ -179,7 +192,8 @@ class CTelegramProto : public PROTO<CTelegramProto>
bool m_bAuthorized, m_bTerminated, m_bUnregister = false, m_bSmileyAdd = false;
int32_t m_iClientId, m_iMsgId;
int64_t m_iQueryId;
-
+
+ OBJLIST<TG_OWN_MESSAGE> m_arOwnMsg;
OBJLIST<TG_REQUEST_BASE> m_arRequests;
mir_cs m_csFiles;