mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Skip channels without write access in forward box.
This commit is contained in:
parent
82a372873f
commit
5120d3ef2c
1 changed files with 5 additions and 1 deletions
|
@ -584,5 +584,9 @@ void ChooseRecipientBoxController::rowClicked(not_null<PeerListRow*> row) {
|
||||||
|
|
||||||
auto ChooseRecipientBoxController::createRow(
|
auto ChooseRecipientBoxController::createRow(
|
||||||
not_null<History*> history) -> std::unique_ptr<Row> {
|
not_null<History*> history) -> std::unique_ptr<Row> {
|
||||||
return std::make_unique<Row>(history);
|
const auto peer = history->peer;
|
||||||
|
const auto skip = peer->isChannel()
|
||||||
|
&& !peer->isMegagroup()
|
||||||
|
&& !peer->canWrite();
|
||||||
|
return skip ? nullptr : std::make_unique<Row>(history);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue