Skip to content

Commit d02a8cb

Browse files
committed
Better handle group conversion and bar settings.
Fixes #29886.
1 parent 3b079aa commit d02a8cb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Telegram/SourceFiles/data/data_peer.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,13 @@ void PeerData::setBarSettings(PeerBarSettings which) {
952952
history->refreshHiddenLinksItems();
953953
});
954954
}
955+
if (const auto from = migrateFrom()) {
956+
if (const auto history = owner().historyLoaded(from)) {
957+
crl::on_main(&history->session(), [=] {
958+
history->refreshHiddenLinksItems();
959+
});
960+
}
961+
}
955962
}
956963
}
957964

@@ -980,6 +987,9 @@ bool PeerData::hideLinks() const {
980987
//if (!isUser()) {
981988
// return false;
982989
//}
990+
if (const auto to = migrateTo()) {
991+
return to->hideLinks();
992+
}
983993
const auto settings = barSettings();
984994
return !settings || (*settings & PeerBarSetting::ReportSpam);
985995
}

0 commit comments

Comments
 (0)