mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Check phone access on join.
This commit is contained in:
parent
8ab1a7268b
commit
344c0f6427
4 changed files with 18 additions and 6 deletions
|
@ -4957,6 +4957,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_confcall_invite_kicked_user" = "{user} was removed from the call.";
|
"lng_confcall_invite_kicked_user" = "{user} was removed from the call.";
|
||||||
"lng_confcall_invite_kicked_many#one" = "**{count} person** was removed from the call.";
|
"lng_confcall_invite_kicked_many#one" = "**{count} person** was removed from the call.";
|
||||||
"lng_confcall_invite_kicked_many#other" = "**{count} people** were removed from the call.";
|
"lng_confcall_invite_kicked_many#other" = "**{count} people** were removed from the call.";
|
||||||
|
"lng_confcall_not_accessible" = "This call is no longer accessible.";
|
||||||
|
|
||||||
"lng_no_mic_permission" = "Telegram needs microphone access so that you can make calls and record voice messages.";
|
"lng_no_mic_permission" = "Telegram needs microphone access so that you can make calls and record voice messages.";
|
||||||
|
|
||||||
|
|
|
@ -1643,8 +1643,8 @@ void GroupCall::sendJoinRequest() {
|
||||||
|
|
||||||
hangup();
|
hangup();
|
||||||
Ui::Toast::Show((type == u"GROUPCALL_FORBIDDEN"_q)
|
Ui::Toast::Show((type == u"GROUPCALL_FORBIDDEN"_q)
|
||||||
? tr::lng_group_not_accessible(tr::now)
|
? tr::lng_confcall_not_accessible(tr::now)
|
||||||
: Lang::Hard::ServerError());
|
: type);
|
||||||
}).send();
|
}).send();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -300,8 +300,9 @@ void ShowConferenceCallLinkBox(
|
||||||
show->showToast({
|
show->showToast({
|
||||||
.title = tr::lng_confcall_link_revoked_title(
|
.title = tr::lng_confcall_link_revoked_title(
|
||||||
tr::now),
|
tr::now),
|
||||||
.text = tr::lng_confcall_link_revoked_text(
|
.text = {
|
||||||
tr::now),
|
tr::lng_confcall_link_revoked_text(tr::now),
|
||||||
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
ExportConferenceCallLink(
|
ExportConferenceCallLink(
|
||||||
|
|
|
@ -876,7 +876,7 @@ void SessionNavigation::resolveConferenceCall(
|
||||||
const auto slug = base::take(_conferenceCallSlug);
|
const auto slug = base::take(_conferenceCallSlug);
|
||||||
const auto inviteMsgId = base::take(_conferenceCallInviteMsgId);
|
const auto inviteMsgId = base::take(_conferenceCallInviteMsgId);
|
||||||
const auto contextId = base::take(_conferenceCallResolveContextId);
|
const auto contextId = base::take(_conferenceCallResolveContextId);
|
||||||
result.data().vcall().match([&](const auto &data) {
|
result.data().vcall().match([&](const MTPDgroupCall &data) {
|
||||||
const auto call = session().data().sharedConferenceCall(
|
const auto call = session().data().sharedConferenceCall(
|
||||||
data.vid().v,
|
data.vid().v,
|
||||||
data.vaccess_hash().v);
|
data.vaccess_hash().v);
|
||||||
|
@ -897,12 +897,22 @@ void SessionNavigation::resolveConferenceCall(
|
||||||
call,
|
call,
|
||||||
(inviter && !inviter->isSelf()) ? inviter : nullptr,
|
(inviter && !inviter->isSelf()) ? inviter : nullptr,
|
||||||
join));
|
join));
|
||||||
|
}, [&](const MTPDgroupCallDiscarded &data) {
|
||||||
|
if (inviteMsgId) {
|
||||||
|
showToast(tr::lng_confcall_not_accessible(tr::now));
|
||||||
|
} else {
|
||||||
|
showToast(tr::lng_confcall_link_inactive(tr::now));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}).fail([=] {
|
}).fail([=] {
|
||||||
_conferenceCallRequestId = 0;
|
_conferenceCallRequestId = 0;
|
||||||
_conferenceCallSlug = QString();
|
_conferenceCallSlug = QString();
|
||||||
_conferenceCallResolveContextId = FullMsgId();
|
_conferenceCallResolveContextId = FullMsgId();
|
||||||
showToast(tr::lng_confcall_link_inactive(tr::now));
|
if (base::take(_conferenceCallResolveContextId)) {
|
||||||
|
showToast(tr::lng_confcall_not_accessible(tr::now));
|
||||||
|
} else {
|
||||||
|
showToast(tr::lng_confcall_link_inactive(tr::now));
|
||||||
|
}
|
||||||
}).send();
|
}).send();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue