@@ -209,6 +209,26 @@ static const vector<string> &get_language_settings_subsections() {
209209 return subsections;
210210}
211211
212+ static const vector<string> &get_notification_settings_subsections () {
213+ static const vector<string> subsections{
214+ " accounts" , " private-chats" , " private-chats/edit" , " private-chats/show" , " private-chats/preview" ,
215+ " private-chats/sound" , " private-chats/add-exception" , " private-chats/delete-exceptions" ,
216+ " private-chats/light-color" , " private-chats/vibrate" , " private-chats/priority" , " groups" , " groups/edit" ,
217+ " groups/show" , " groups/preview" , " groups/sound" , " groups/add-exception" , " groups/delete-exceptions" ,
218+ " groups/light-color" , " groups/vibrate" , " groups/priority" , " channels" , " channels/edit" , " channels/show" ,
219+ " channels/preview" , " channels/sound" , " channels/add-exception" , " channels/delete-exceptions" ,
220+ " channels/light-color" , " channels/vibrate" , " channels/priority" , " stories" , " stories/new" , " stories/important" ,
221+ " stories/show-sender" , " stories/sound" , " stories/add-exception" , " stories/delete-exceptions" ,
222+ " stories/light-color" , " stories/vibrate" , " stories/priority" , " reactions" , " reactions/messages" ,
223+ " reactions/stories" , " reactions/show-sender" , " reactions/sound" , " reactions/light-color" , " reactions/vibrate" ,
224+ " reactions/priority" , " in-app-sounds" , " in-app-vibrate" , " in-app-preview" , " in-chat-sounds" , " in-app-popup" ,
225+ " lock-screen-names" , " include-channels" , " include-muted-chats" , " count-unread-messages" , " new-contacts" ,
226+ " pinned-messages" , " reset" ,
227+ // no formatting
228+ " web" };
229+ return subsections;
230+ }
231+
212232static const vector<string> &get_privacy_settings_subsections () {
213233 static const vector<string> subsections{
214234 " blocked" , " blocked/edit" , " blocked/block-user" , " blocked/block-user/chats" , " blocked/block-user/contacts" ,
@@ -972,6 +992,12 @@ class LinkManager::InternalLinkSettings final : public InternalLink {
972992 if (path_[0 ] == " login_email" ) {
973993 return td_api::make_object<td_api::settingsSectionLoginEmail>();
974994 }
995+ if (path_[0 ] == " notifications" ) {
996+ if (!subsection.empty () && td::contains (get_notification_settings_subsections (), subsection)) {
997+ return td_api::make_object<td_api::settingsSectionNotifications>(subsection);
998+ }
999+ return td_api::make_object<td_api::settingsSectionNotifications>();
1000+ }
9751001 if (path_[0 ] == " password" ) {
9761002 return td_api::make_object<td_api::settingsSectionPassword>();
9771003 }
@@ -3023,6 +3049,13 @@ Result<string> LinkManager::get_internal_link_impl(const td_api::InternalLinkTyp
30233049 return " tg://stars" ;
30243050 case td_api::settingsSectionMyToncoins::ID :
30253051 return " tg://ton" ;
3052+ case td_api::settingsSectionNotifications::ID : {
3053+ const auto &subsection = static_cast <const td_api::settingsSectionNotifications *>(section_ptr)->subsection_ ;
3054+ if (td::contains (get_notification_settings_subsections (), subsection)) {
3055+ return PSTRING () << " tg://settings/notifications/" << subsection;
3056+ }
3057+ return " tg://settings/notifications" ;
3058+ }
30263059 case td_api::settingsSectionPassword::ID :
30273060 return " tg://settings/password" ;
30283061 case td_api::settingsSectionPhoneNumber::ID :
0 commit comments