summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/server.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-09-30 13:40:14 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-09-30 13:40:14 +0300
commit3ea151ed7440be73dccc664c0464e0dfc8e72ad0 (patch)
tree5dde4a49e4b7ca593d60da4e46422bed26a4b686 /protocols/Telegram/src/server.cpp
parentc90272a48520b1937624c0058f94b06e536f5ff6 (diff)
fixes #4696 (MessageState: add Telegram support)
Diffstat (limited to 'protocols/Telegram/src/server.cpp')
-rw-r--r--protocols/Telegram/src/server.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp
index c2c8d3c1f2..b770fe42ef 100644
--- a/protocols/Telegram/src/server.cpp
+++ b/protocols/Telegram/src/server.cpp
@@ -880,6 +880,9 @@ void CTelegramProto::ProcessMarkRead(TD::updateChatReadInbox *pObj)
db_event_markRead(pUser->hContact, hEvent, true);
}
+ if (g_plugin.hasMessageState && pObj->unread_count_ == 0)
+ CallService(MS_MESSAGESTATE_UPDATE, GetRealContact(pUser), MRD_TYPE_READ);
+
if (Contact::IsGroupChat(pUser->hContact) && pObj->unread_count_ == 0)
delSetting(pUser->hContact, "ApparentMode");
}