mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 23:53:58 +02:00
Handle GROUPCALL_FORBIDDEN in joinGroupCall.
This commit is contained in:
parent
a14a62eefa
commit
49fc066480
3 changed files with 13 additions and 4 deletions
|
@ -240,6 +240,8 @@ void GroupCall::rejoin() {
|
||||||
? tr::lng_group_call_no_anonymous(tr::now)
|
? tr::lng_group_call_no_anonymous(tr::now)
|
||||||
: type == u"GROUPCALL_PARTICIPANTS_TOO_MUCH"_q
|
: type == u"GROUPCALL_PARTICIPANTS_TOO_MUCH"_q
|
||||||
? tr::lng_group_call_too_many(tr::now)
|
? tr::lng_group_call_too_many(tr::now)
|
||||||
|
: type == u"GROUPCALL_FORBIDDEN"_q
|
||||||
|
? tr::lng_group_not_accessible(tr::now)
|
||||||
: Lang::Hard::ServerError()),
|
: Lang::Hard::ServerError()),
|
||||||
});
|
});
|
||||||
}).send();
|
}).send();
|
||||||
|
|
|
@ -33,6 +33,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/image/image.h"
|
#include "ui/image/image.h"
|
||||||
#include "ui/empty_userpic.h"
|
#include "ui/empty_userpic.h"
|
||||||
#include "ui/text/text_options.h"
|
#include "ui/text/text_options.h"
|
||||||
|
#include "ui/toasts/common_toasts.h"
|
||||||
#include "history/history.h"
|
#include "history/history.h"
|
||||||
#include "history/view/history_view_element.h"
|
#include "history/view/history_view_element.h"
|
||||||
#include "history/history_item.h"
|
#include "history/history_item.h"
|
||||||
|
@ -108,9 +109,11 @@ void PeerClickHandler::onClick(ClickContext context) const {
|
||||||
&& !clickedChannel->amIn()
|
&& !clickedChannel->amIn()
|
||||||
&& (!currentPeer->isChannel()
|
&& (!currentPeer->isChannel()
|
||||||
|| currentPeer->asChannel()->linkedChat() != clickedChannel)) {
|
|| currentPeer->asChannel()->linkedChat() != clickedChannel)) {
|
||||||
Ui::show(Box<InformBox>(_peer->isMegagroup()
|
Ui::ShowMultilineToast({
|
||||||
? tr::lng_group_not_accessible(tr::now)
|
.text = (_peer->isMegagroup()
|
||||||
: tr::lng_channel_not_accessible(tr::now)));
|
? tr::lng_group_not_accessible(tr::now)
|
||||||
|
: tr::lng_channel_not_accessible(tr::now)),
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
window->showPeerHistory(
|
window->showPeerHistory(
|
||||||
_peer,
|
_peer,
|
||||||
|
|
|
@ -2397,7 +2397,11 @@ void HistoryWidget::messagesFailed(const RPCError &error, int requestId) {
|
||||||
|| error.type() == qstr("USER_BANNED_IN_CHANNEL")) {
|
|| error.type() == qstr("USER_BANNED_IN_CHANNEL")) {
|
||||||
auto was = _peer;
|
auto was = _peer;
|
||||||
controller()->showBackFromStack();
|
controller()->showBackFromStack();
|
||||||
Ui::show(Box<InformBox>((was && was->isMegagroup()) ? tr::lng_group_not_accessible(tr::now) : tr::lng_channel_not_accessible(tr::now)));
|
Ui::ShowMultilineToast({
|
||||||
|
.text = ((was && was->isMegagroup())
|
||||||
|
? tr::lng_group_not_accessible(tr::now)
|
||||||
|
: tr::lng_channel_not_accessible(tr::now)),
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue