From 71d80f73bfbfc744a947ad5be6d4fa7531f3ae51 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 1 Apr 2019 20:34:25 +0300 Subject: [PATCH] Improve documentation. GitOrigin-RevId: 103083710620ccbc93ca240acd1a75b780dff612 --- td/generate/scheme/td_api.tl | 5 +++-- td/telegram/MessagesManager.cpp | 1 + td/telegram/NotificationManager.cpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 35fc4902..ea632b58 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -1944,8 +1944,9 @@ notificationTypeNewSecretChat = NotificationType; //@description New call was received @call_id Call identifier notificationTypeNewCall call_id:int32 = NotificationType; -//@description New message was received through a push notification @message_id The message identifier @sender_user_id Sender of the message. Corresponding user may be inaccessible -//@content_type Notification content type @argument Optional argument for the notification content type +//@description New message was received through a push notification @message_id The message identifier. The message will not be available in the chat history +//@sender_user_id Sender of the message. Corresponding user may be inaccessible +//@content_type Notification content type. See https://core.telegram.org/tdlib/notification-api for the list of available content types @argument Optional argument for the notification content type notificationTypeNewPushMessage message_id:int53 sender_user_id:int32 content_type:string argument:string = NotificationType; diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 303640cf..8b0340ce 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -10253,6 +10253,7 @@ void MessagesManager::try_restore_dialog_reply_markup(Dialog *d, const Message * } void MessagesManager::set_dialog_pinned_message_notification(Dialog *d, MessageId message_id) { + CHECK(d != nullptr); auto old_message_id = d->pinned_message_notification_message_id; if (old_message_id == message_id) { return; diff --git a/td/telegram/NotificationManager.cpp b/td/telegram/NotificationManager.cpp index bb6ab350..c722e4a6 100644 --- a/td/telegram/NotificationManager.cpp +++ b/td/telegram/NotificationManager.cpp @@ -2564,7 +2564,7 @@ void NotificationManager::process_push_notification(string payload, Promise