69bfc65da7
Postbox refactor waves 138–276: 168-commit squash
...
Consolidates 137 wave commits + 31 supporting commits (CLAUDE.md bump,
typealias additions, AnyObject→EngineMedia restoration) into one squashed
commit. Migrates dozens of consumer-side public APIs, struct fields,
protocol methods, and enum payloads from Postbox protocols/structs to
TelegramEngine engine wrappers and typealiases. Drops `import Postbox`
from many files. Adds new TelegramCore typealiases and one
TelegramEngineUnauthorized facade.
Notable changes by category:
**TelegramCore typealias additions** (rule 2 — narrow utility typealiases):
- EngineChatListIndex, EngineTempBoxFile, EngineItemCollectionItemIndex,
EngineItemCollectionViewEntryIndex, EngineValueBoxEncryptionParameters,
EngineMessageAndThreadId, EnginePeerStoryStats, EngineMessageHistoryAnchorIndex,
EngineChatListTotalUnreadStateCategory, EngineChatListTotalUnreadStateStats,
EnginePeerSummaryCounterTags, EngineChatListTotalUnreadState,
EngineItemCacheEntryId, EngineHashFunctions,
EngineCachedMediaResourceRepresentationResult,
EngineMediaResourceDataFetchResult, EngineMediaResourceDataFetchError,
EngineMediaResourceStatus, EngineCachedPeerData
**TelegramCore engine extensions/forwarders**:
- EngineMessage.engineMedia, EngineMessage.enginePeers,
EngineMessage.adAttribute, EngineMessage.effectivelyIncoming
- engineFileSize forwarder
- TelegramEngine.Resources.clearCachedMediaResources(mediaResourceIds: Set<EngineMediaResource.Id>)
- TelegramEngine.Resources.fetchStatus(id:resourceSize:)
- TelegramEngineUnauthorized.UnauthorizedResources facade with storeResourceData
**Public API/struct migrations to engine types**:
- ChatAvailableMessageActions.banAuthor/banAuthors → EnginePeer?/[EnginePeer]
- WebSessionsContextState.peers → [EnginePeer.Id: EnginePeer]
- CacheUsageStats.peers → [EnginePeer.Id: EnginePeer]
- PeerCommand.peer → EnginePeer
- PeerInfoControllerMode.calls(messages:) → [EngineMessage]
- CallControllerNodeProtocol.updatePeer → EnginePeer params
- ChatHistoryListNode.messageInCurrentHistoryView (and 4 variants) → EngineMessage?
- ChatHistorySearchContainerNode.messageForGallery → EngineMessage?
- PeerInfoPaneNode.findLoadedMessage / ensureMessageIsVisible /
transitionNodeForGallery → engine-typed
- GalleryHiddenMediaTarget.getTransitionInfo /
GalleryHiddenMediaManager.findTarget → engine-typed
- ChatPanelInterfaceInteraction.presentReactionDeletionOptions /
presentBan*MessageOptions → EnginePeer
- DrawingMessageRenderer.messages → [EngineMessage]
- ChatVideoGalleryItemScrubberView.setFetchStatusSignal →
EngineMediaResource.FetchStatus
- ChannelDiscussionGroupActionSheetItem.peer, VoiceChatPeerEntry.peer,
VoiceChatFullscreenParticipantItem.peer, MediaStreamComponent.chatPeer,
MediaStreamVideoComponent.callPeer, ChatMessageContactBubbleContentNode.contactPeer,
ChatMessageForwardInfoNode.peer, ChatMessageCommentFooterContentNode.replyPeers,
ChatReportPeerTitlePanelNode.peer, ChatMessageActionUrlAuthController.bot,
PeerMediaCollectionInterfaceState.peer, ChatMessageCallBubbleContentNode.peopleAvatars,
ChatLoadingNode.renderedPeer (→ EngineRenderedPeer) — all to engine types
**Wave-71-shadow stored-field migrations** (Postbox Peer/Message → Engine wrapper):
- LegacyCallControllerNode.peer
- CallStatusBarNode.currentPeer
**Dead-code / dead-field removals**:
- CallController.peer, CallControllerNodeV2.account,
ContactMultiselectionController PeerNameIndex fields,
preparedChatListNodeViewTransition account: Account param,
FetchResource.swift entirely (unused function)
**Module-level Postbox import drops**: 30+ files including TelegramRootController,
EditStories, GiftViewScreen, AnimatedStickerUtils, FetchPhotoLibraryImageResource,
PeerInfoGiftsPaneNode, PeerInfoPaneContainerNode, PresentAddMembers,
PeerInfoProfileItems, ChatControllerAdminBanUsers, PresentationData typealiases,
DefaultDayPresentationTheme, ChatListViewTransition, GalleryHiddenMediaManager,
RecentSessionsController, GifContext, AuthorizationSequenceController,
PeerInfoHeaderEditingContentNode, PeerInfoHeaderNode,
PeerAllowedReactionListController, CallControllerNodeV2, and 6 PeerInfo pane files.
**AnyObject restoration**: rule 8 added (never substitute Postbox protocols
with Any/AnyObject) — undid previous AnyObject substitutions in waves 141/143
back to EngineMedia.
Doc maintenance: CLAUDE.md updated to reflect new typealiases and forwarders.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-05 00:44:27 +02:00
Ilya Laktyushin
96b1432434
Various improvements
2026-04-24 04:55:22 +02:00
81e17da3fb
Refactor constructor use sites for types 420-439 to struct pattern
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-18 23:22:34 +08:00
5e27a39d80
Refactor constructor use sites for types 380-399 to struct pattern
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-18 22:58:30 +08:00
55c53717af
Refactor constructor use sites for types 360-379 to struct pattern
...
Migrated 20 types including userProfilePhoto, userStatus*, username, videoSize*,
wallPaper*, webDocument*, webPage*, webViewResultUrl, authorizations,
authorizationForm, autoDownloadSettings, businessChatLinks, chatThemes,
connectedBots, and contentSettings.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-18 22:45:35 +08:00
c6b0ef5da3
Refactor constructor use sites for types 220-239 to struct pattern
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-18 02:08:10 +08:00
e68bdc05ca
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 >
2026-01-16 15:18:11 +08:00
6b2c0f9c53
Refactor constructor use sites for types 100-119 to struct pattern
...
Migrated 22 constructors: fileHash, folder, folderPeer, forumTopic,
forumTopicDeleted, foundStory, game, geoPoint, geoPointAddress,
globalPrivacySettings, groupCall, groupCallDiscarded, groupCallDonor,
groupCallMessage, groupCallParticipant, groupCallParticipantVideo,
groupCallParticipantVideoSourceGroup, groupCallStreamChannel,
highScore, importedContact, inlineBotSwitchPM, inlineBotWebView
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-16 02:41:47 +08:00
a78b2c0db2
Refactor Api types 70-89 to use struct-wrapped constructors
...
Types refactored:
- 70-79: contactStatus, dataJSON, dcOption, defaultHistoryTTL, dialog,
dialogFolder, dialogFilter, dialogFilterChatlist, dialogFilterSuggested,
dialogPeer, dialogPeerFolder, disallowedGiftsSettings, document, documentEmpty
- 80-89: documentAttribute* (Audio, CustomEmoji, Filename, ImageSize, Sticker, Video),
draftMessage, draftMessageEmpty, emailVerification* (Apple, Code, Google),
emailVerifyPurposeLoginSetup, emoji* (Group, GroupGreeting, GroupPremium,
Keyword, KeywordDeleted, KeywordsDifference, Language, List, Status,
StatusCollectible), inputEmojiStatusCollectible
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-16 02:12:20 +08:00
68d60d34dc
Refactor Api types 43-52 to use struct-wrapped constructors
...
Also adds -warnings-as-errors to TelegramCore Package.swift
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-16 00:33:37 +08:00
94cb9d3228
Refactor Api types 3-12 to use struct-wrapped constructors
...
Types refactored:
- AttachMenuBotIconColor, AttachMenuBots, AttachMenuBotsBot
- AuctionBidLevel, Authorization, AutoDownloadSettings
- AutoSaveException, AutoSaveSettings, AvailableEffect
Updated pattern matching and construction sites in TelegramCore.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-15 19:11:04 +08:00
138cc9f51e
Refactor Api types 0-2 to use struct-wrapped constructors
...
- AccountDaysTTL, AttachMenuBot, AttachMenuBotIcon now use Cons_* classes
- Updated use sites in TelegramCore to destructure from wrapper
- Generated Api files with stub functions for faster compilation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-01-15 18:59:46 +08:00
Ilya Laktyushin
2cb5122bb3
Various improvements
2025-10-20 22:57:29 +04:00
Ilya Laktyushin
d58757ca3c
Various improvements
2025-10-16 19:19:50 +04:00
Isaacand Isaac
f77609e6fa
Various improvements
2025-08-25 22:57:08 +02:00
Isaacand Isaac
709d474929
Update API
2025-08-08 13:24:44 +02:00
Isaacand Isaac
b752a49432
Update API
2025-05-15 00:54:50 +08:00
Ilya Laktyushin
5e79ec4b32
Frozen account improvements
2025-03-19 16:40:26 +04:00
Ilya Laktyushin
ef3eb05d69
Frozen account improvements
2025-03-19 14:39:39 +04:00
Ilya Laktyushin
8a8ff6fddc
Various fixes
2025-03-18 14:55:03 +04:00
Ilya Laktyushin
2454a7a876
Various improvements
2025-03-18 14:39:58 +04:00
Ilya Laktyushin
fed338985d
Various improvements
2025-03-14 13:35:44 +04:00
Ilya Laktyushin
ff34190f92
Update API
2025-03-14 06:04:23 +04:00
Ilya Laktyushin
7a89a58930
Various improvements
2025-02-28 20:09:31 +04:00
Ilya Laktyushin
d167aa4b0e
Update API [skip ci]
2025-02-18 10:09:58 +04:00
Ilya Laktyushin
2f2a27f0d2
Various improvements [skip ci]
2025-02-12 22:15:02 +04:00
Isaacand Isaac
067c35f545
Fix build
2024-12-19 16:26:41 +08:00
Ilya Laktyushin
d776dc0597
Add gift auto save privacy
2024-11-14 05:20:19 +04:00
Isaacand Isaac
05372b578c
[WIP] Stars reactions
2024-07-30 23:44:19 +08:00
Isaacand Isaac
4b1b272081
Merge commit '532e873ed0eaf0b7c5b9c77430be2ccde6c9c328'
...
# Conflicts:
# submodules/TelegramApi/Sources/Api11.swift
# submodules/TelegramApi/Sources/Api12.swift
# submodules/TelegramApi/Sources/Api19.swift
# submodules/TelegramCore/Sources/TelegramEngine/Peers/UpdateCachedPeerData.swift
2024-03-19 14:21:11 +04:00
Isaacand Isaac
bd8514ff20
Premium features
2024-03-19 14:20:31 +04:00
Ilya Laktyushin
8279db283c
Update API [skip ci]
2024-03-18 23:53:29 +04:00
Isaacand Isaac
925665b88b
Premium users in privacy settings
2024-03-15 19:29:04 +04:00
Isaacand Isaac
6a89f938db
[WIP] Saved messages
2024-01-06 00:43:58 +04:00
Isaacand Isaac
09e025e985
[WIP] Channel appearance
2023-12-15 22:59:33 +04:00
Ilya Laktyushin
44b0464161
Update API [skip ci]
2023-12-12 10:25:15 +04:00
Isaacand Isaac
497c7fab1f
Update API
2023-11-22 16:42:29 +04:00
Ilya Laktyushin
cc2bd5ec92
Stats and recommendations improvements
2023-11-19 19:10:13 +04:00
Ilya Laktyushin
137c3d9101
Update API
2023-10-16 13:20:46 +04:00
Aliand Ali
f4545aaeeb
Support updated API
2023-09-05 13:41:05 +04:00
Ilya Laktyushin
41b8e7977d
Various fixes
2023-08-07 15:45:37 +02:00
Ilya Laktyushin
74faad7a03
Various improvements
2023-08-05 15:32:12 +02:00
Ilya Laktyushin
75129f6ecb
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
2023-07-30 16:34:38 +02:00
Ilya Laktyushin
b70586eb28
Story location picking
2023-07-30 15:01:25 +02:00
Aliand Ali
957490fefc
Update API
2023-07-30 13:47:02 +03:00
Aliand Ali
2e09bfe14f
Stories
2023-07-14 23:31:21 +04:00
Aliand Ali
6f084010d8
Stories
2023-07-13 23:51:40 +04:00
Aliand Ali
f3ee06dd32
Stories
2023-07-07 02:03:11 +04:00
Ilya Laktyushin
eeb1c469f3
Camera and editor improvements
2023-05-26 17:32:02 +04:00
Ilya Laktyushin
a2d7cfba4f
Camera and editor improvements
2023-05-15 15:12:51 +04:00