Show correct error on stopped starref.

This commit is contained in:
John Preston
2024-11-29 23:04:34 +04:00
parent b401c37c39
commit ad6272bfe5
2 changed files with 4 additions and 1 deletions
@@ -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)),