Refactor Api types 150-179 to use struct-wrapped constructors

- Update pattern matches to use struct-based extraction for inputPeer*,
  inputMedia*, inputReplyTo*, inputSticker*, inputPhoto, inputUser, etc.
- Wrap constructor calls with .init() for struct-wrapped enum cases
- 47 TelegramCore source files modified
- 5 TelegramApi files regenerated with --struct-count=180

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Isaac
2026-01-16 15:18:11 +08:00
parent 33a0d9e62c
commit e68bdc05ca
52 changed files with 1391 additions and 394 deletions

View File

@@ -240,7 +240,8 @@ private func pushPeerReadState(network: Network, postbox: Postbox, stateManager:
return inputPeer(postbox: postbox, peerId: peerId)
|> mapToSignal { inputPeer -> Signal<PeerReadState, PeerReadStateValidationError> in
switch inputPeer {
case let .inputPeerChannel(channelId, accessHash):
case let .inputPeerChannel(inputPeerChannelData):
let (channelId, accessHash) = (inputPeerChannelData.channelId, inputPeerChannelData.accessHash)
switch readState {
case let .idBased(maxIncomingReadId, _, _, _, markedUnread):
var pushSignal: Signal<Void, NoError> = network.request(Api.functions.channels.readHistory(channel: Api.InputChannel.inputChannel(.init(channelId: channelId, accessHash: accessHash)), maxId: maxIncomingReadId))