Retire shared media of a deleted topic with no object

Task: 2026/08/20/retire-forum-media-lists-without-topic-objects
This commit is contained in:
John Preston
2026-08-20 13:07:06 +04:00
committed by 23rd
parent 839febb51d
commit d32ca282b5

View File

@@ -209,6 +209,12 @@ void Forum::applyTopicDeleted(MsgId rootId) {
const auto i = _topics.find(rootId);
if (i == end(_topics)) {
if (rootId) {
session().storage().unload(Storage::SharedMediaUnloadThread(
_history->peer->id,
rootId,
PeerId()));
}
return;
}
const auto raw = i->second.get();