summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-02-05 21:20:15 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-02-05 21:20:15 +0300
commit377d86974a99842a487d6e3a782f9ae6ed1bb913 (patch)
tree5dca40a0d29c39801eae6dc96c3fb1d4e13d0d4b
parentcf1b6f456049b8c2d69edd99ec64e3e906774c04 (diff)
the simpler the better
-rw-r--r--protocols/Telegram/src/server.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp
index aab8a3a49e..b411cba637 100644
--- a/protocols/Telegram/src/server.cpp
+++ b/protocols/Telegram/src/server.cpp
@@ -411,9 +411,8 @@ void CTelegramProto::ProcessMessage(TD::updateNewMessage *pObj)
pre.szMessage = szText.GetBuffer();
pre.szMsgId = szId;
pre.timestamp = pMessage->date_;
- if (pMessage->sender_id_->get_id() == TD::messageSenderUser::ID)
- if (((TD::messageSenderUser *)pMessage->sender_id_.get())->user_id_ == m_iOwnId)
- pre.flags |= PREF_SENT;
+ if (pMessage->is_outgoing_)
+ pre.flags |= PREF_SENT;
ProtoChainRecvMsg(pUser->hContact, &pre);
}