mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
restricted peers support added
This commit is contained in:
@@ -2244,9 +2244,16 @@ void MainWidget::ctrlEnterSubmitUpdated() {
|
||||
void MainWidget::ui_showPeerHistory(quint64 peerId, qint32 showAtMsgId, bool back) {
|
||||
if (PeerData *peer = App::peerLoaded(peerId)) {
|
||||
if (peer->migrateTo()) {
|
||||
peerId = peer->migrateTo()->id;
|
||||
peer = peer->migrateTo();
|
||||
peerId = peer->id;
|
||||
if (showAtMsgId > 0) showAtMsgId = -showAtMsgId;
|
||||
}
|
||||
QString restriction = peer->restrictionReason();
|
||||
if (!restriction.isEmpty()) {
|
||||
Ui::showChatsList();
|
||||
Ui::showLayer(new InformBox(restriction));
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!back && (!peerId || (_stack.size() == 1 && _stack[0]->type() == HistoryStackItem && _stack[0]->peer->id == peerId))) {
|
||||
back = true;
|
||||
|
Reference in New Issue
Block a user