summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-04-23 12:11:46 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-04-23 12:11:46 +0300
commitef40f8ccd5f9928fc37e934c91ac46a4adc73f7a (patch)
tree4b789e276a973b0956f023b5ad88c848eaba61ed /protocols
parentf969ef3a76254ef5f53e67f7f94baf5565db6ec5 (diff)
Telegram: recently seen status processing
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Telegram/src/server.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp
index 311633ed9f..920d772902 100644
--- a/protocols/Telegram/src/server.cpp
+++ b/protocols/Telegram/src/server.cpp
@@ -581,13 +581,20 @@ void CTelegramProto::ProcessStatus(TD::updateUserStatus *pObj)
if (pUser->hContact == INVALID_CONTACT_ID)
return;
- if (pObj->status_->get_id() == TD::userStatusOnline::ID)
+ switch (pObj->status_->get_id()) {
+ case TD::userStatusOnline::ID:
setWord(pUser->hContact, "Status", ID_STATUS_ONLINE);
- else if (pObj->status_->get_id() == TD::userStatusOffline::ID) {
+ break;
+
+ case TD::userStatusRecently::ID:
+ case TD::userStatusOffline::ID:
setWord(pUser->hContact, "Status", ID_STATUS_AWAY);
pUser->m_timer1 = time(0);
+ break;
+
+ default:
+ debugLogA("!!!!! Unknown status packet, report it to the developers");
}
- else debugLogA("!!!!! Unknown status packet, report it to the developers");
}
}