From ff50eec3ee031f9f51f574a7af34802db86cfea9 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 15 Apr 2022 15:30:51 +0300 Subject: [PATCH] Add notificationSound.date. --- td/generate/scheme/td_api.tl | 3 +- td/telegram/AudiosManager.cpp | 11 +++- td/telegram/AudiosManager.h | 3 +- td/telegram/AudiosManager.hpp | 107 +++++++++++++++++++++++++++---- td/telegram/DocumentsManager.cpp | 6 +- td/telegram/MessageContent.cpp | 2 +- td/telegram/Version.h | 1 + 7 files changed, 112 insertions(+), 21 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 6ef9ee0d3..ef1fbcf4e 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -3162,10 +3162,11 @@ notificationGroupTypeCalls = NotificationGroupType; //@description Describes a notification sound in MP3 format //@id Unique identifier of the notification sound //@duration Duration of the sound, in seconds +//@date Point in time (Unix timestamp) when the sound was created //@title Title of the notification sound //@data Arbitrary data, defined while the sound was uploaded //@sound File containing the sound -notificationSound id:int64 duration:int32 title:string data:string sound:file = NotificationSound; +notificationSound id:int64 duration:int32 date:int32 title:string data:string sound:file = NotificationSound; //@description Contains a list of notification sounds @notification_sounds A list of notification sounds notificationSounds notification_sounds:vector = NotificationSounds; diff --git a/td/telegram/AudiosManager.cpp b/td/telegram/AudiosManager.cpp index baccd4d93..32e5966d4 100644 --- a/td/telegram/AudiosManager.cpp +++ b/td/telegram/AudiosManager.cpp @@ -58,8 +58,8 @@ td_api::object_ptr AudiosManager::get_notification_so CHECK(file_view.get_type() == FileType::Ringtone); CHECK(file_view.has_remote_location()); auto document_id = file_view.remote_location().get_id(); - return td_api::make_object(document_id, audio->duration, audio->title, audio->performer, - td_->file_manager_->get_file_object(file_id)); + return td_api::make_object(document_id, audio->duration, audio->date, audio->title, + audio->performer, td_->file_manager_->get_file_object(file_id)); } FileId AudiosManager::on_get_audio(unique_ptr