Files
ghostgram/submodules/TelegramCore/Sources/State/ForumThreadResolutionGuard.swift
T
ichmagmaus111andClaude Opus 5.5 534cabe35b bug fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 16:55:08 +01:00

16 lines
648 B
Swift

import Foundation
import Postbox
/// Whether a history fill should ask the server for thread infos of `peer`'s messages.
///
/// Every channel post is stored with `threadId = 1` (`StoreMessage_Telegram.swift`), and a thread
/// info exists only for a forum topic or a monoforum sublist. Asking a plain channel for topic 1
/// returns nothing, stores nothing, and so repeats on every fill, one sequential round trip before
/// the messages are stored (measured 2026-10-13, three times in one chat open).
func peerCanHaveForumThreads(_ peer: Peer?) -> Bool {
guard let peer else {
return false
}
return peer.isForumOrMonoForum
}