summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Telegram/src/server.cpp')
-rw-r--r--protocols/Telegram/src/server.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp
index a8e6e23b59..9303509442 100644
--- a/protocols/Telegram/src/server.cpp
+++ b/protocols/Telegram/src/server.cpp
@@ -326,6 +326,10 @@ void CTelegramProto::ProcessResponse(td::ClientManager::Response response)
ProcessScopeNotification((TD::updateScopeNotificationSettings *)response.object.get());
break;
+ case TD::updateServiceNotification::ID:
+ ProcessServiceNotification((TD::updateServiceNotification *)response.object.get());
+ break;
+
case TD::updateSupergroup::ID:
ProcessSuperGroup((TD::updateSupergroup *)response.object.get());
break;
@@ -1159,6 +1163,18 @@ void CTelegramProto::ProcessScopeNotification(TD::updateScopeNotificationSetting
}
}
+void CTelegramProto::ProcessServiceNotification(TD::updateServiceNotification *pObj)
+{
+ if (pObj->content_->get_id() != TD::messageText::ID) {
+ debugLogA("Expected type %d, but got %d, ignored", TD::messageText::ID, pObj->content_->get_id());
+ return;
+ }
+
+ auto *pMessageText = (TD::messageText *)pObj->content_.get();
+ CMStringA szMessage(GetFormattedText(pMessageText->text_));
+ Popup(0, Utf2T(szMessage), TranslateT("Service notification"));
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
void CTelegramProto::ProcessStatus(TD::updateUserStatus *pObj)