2
0
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:
John Preston
2016-03-23 16:21:26 +03:00
parent 2ead44d9c0
commit 4a5b63bbcd
5 changed files with 98 additions and 40 deletions

View File

@@ -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;