diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 95f1fa240..78097555e 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -1703,6 +1703,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_star_ref_link_copy_users#other" = "{count} users have opened {app} through this link."; "lng_star_ref_link_copied_title" = "Link copied to clipboard"; "lng_star_ref_link_copied_text" = "Share this link and earn {amount} of what people who use it spend in {app}!"; +"lng_star_ref_stopped" = "This link was part of an affiliate program that has been terminated by the app owner."; "lng_manage_discussion_group" = "Discussion"; "lng_manage_discussion_group_add" = "Add a group"; diff --git a/Telegram/SourceFiles/window/window_session_controller.cpp b/Telegram/SourceFiles/window/window_session_controller.cpp index 5424cfcef..cc73eddba 100644 --- a/Telegram/SourceFiles/window/window_session_controller.cpp +++ b/Telegram/SourceFiles/window/window_session_controller.cpp @@ -472,7 +472,9 @@ void SessionNavigation::resolveUsername( resolveDone(result, done); }).fail([=](const MTP::Error &error) { _resolveRequestId = 0; - if (error.code() == 400) { + if (error.type() == u"STARREF_EXPIRED"_q) { + parentController()->showToast(tr::lng_star_ref_stopped(tr::now)); + } else if (error.code() == 400) { parentController()->show( Ui::MakeInformBox( tr::lng_username_not_found(tr::now, lt_user, username)),