mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-03 21:54:05 +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_many#one" = "**{count} person** was 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.";
|
||||
|
||||
|
|
|
@ -1643,8 +1643,8 @@ void GroupCall::sendJoinRequest() {
|
|||
|
||||
hangup();
|
||||
Ui::Toast::Show((type == u"GROUPCALL_FORBIDDEN"_q)
|
||||
? tr::lng_group_not_accessible(tr::now)
|
||||
: Lang::Hard::ServerError());
|
||||
? tr::lng_confcall_not_accessible(tr::now)
|
||||
: type);
|
||||
}).send();
|
||||
}
|
||||
|
||||
|
|
|
@ -300,8 +300,9 @@ void ShowConferenceCallLinkBox(
|
|||
show->showToast({
|
||||
.title = tr::lng_confcall_link_revoked_title(
|
||||
tr::now),
|
||||
.text = tr::lng_confcall_link_revoked_text(
|
||||
tr::now),
|
||||
.text = {
|
||||
tr::lng_confcall_link_revoked_text(tr::now),
|
||||
},
|
||||
});
|
||||
};
|
||||
ExportConferenceCallLink(
|
||||
|
|
|
@ -876,7 +876,7 @@ void SessionNavigation::resolveConferenceCall(
|
|||
const auto slug = base::take(_conferenceCallSlug);
|
||||
const auto inviteMsgId = base::take(_conferenceCallInviteMsgId);
|
||||
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(
|
||||
data.vid().v,
|
||||
data.vaccess_hash().v);
|
||||
|
@ -897,12 +897,22 @@ void SessionNavigation::resolveConferenceCall(
|
|||
call,
|
||||
(inviter && !inviter->isSelf()) ? inviter : nullptr,
|
||||
join));
|
||||
}, [&](const MTPDgroupCallDiscarded &data) {
|
||||
if (inviteMsgId) {
|
||||
showToast(tr::lng_confcall_not_accessible(tr::now));
|
||||
} else {
|
||||
showToast(tr::lng_confcall_link_inactive(tr::now));
|
||||
}
|
||||
});
|
||||
}).fail([=] {
|
||||
_conferenceCallRequestId = 0;
|
||||
_conferenceCallSlug = QString();
|
||||
_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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue