e918b353ec
Postbox refactor waves 278-356: squash
...
Squashes 79 sequential refactor waves into a single commit.
Highlights:
- Drop `import Postbox` (and matching `//submodules/Postbox` BUILD deps) from a wide swath of consumer files: ChatList, ChatMessage*BubbleContentNode subclasses, ListMessageNode/ListMessageItem, GalleryData, ChatHistorySearchContainerNode, ChatPanelInterfaceInteraction, ChatControllerInteraction, ChatMessageStickerItemNode, ChatMessageReplyInfoNode, ChatMessageInstantVideoItemNode, ChatPresentationInterfaceState, BrowserMarkdown/Readability, MediaResources, LocalMediaResources, ICloudResources, FetchManager, ShareController, OpenChatMessage, GalleryController, GroupStickerSearchContainerNode, GroupStickerPackCurrentItem, ChatPinnedMessageTitlePanelNode, OverlayAudioPlayerController, PresentationThemeSettings, StatisticsUI/StoryIconNode, TextFormat/StringWithAppliedEntities, GalleryUI/VideoAdComponent, StickerPackPreviewUI, WallpaperPreviewMedia, WallpaperResources, YoutubeEmbedImplementation, InstantPageExternalMediaResource, PlatformRestrictionMatching, TelegramUIDeclareEncodables, ChatListNode/ChatListSearchContainerNode.
- Add `TelegramEngine` facades: `Themes.wallpapers`, `Themes.themes`, `AccountData.addAppLogEvent`.
- Add `EngineMessageHistoryEntryLocation` wrapper.
- Add `EngineRaw*` escape-hatch typealiases (`EngineRawMessage`, `EngineRawPeer`, `EngineRawMedia`, `EngineRawMediaResource`, `EngineRawMediaResourceData`, `EngineRawItemCollectionItem`, `EngineRawItemCollectionInfo`) and `engineDeclareEncodable` forwarder.
- Drop unused `account:`/`postbox:`/`network:` parameters from several public functions and delete the dead overloads/types/functions left over: `automaticThemeShouldSwitchNow`, `cancelFreeMediaFileInteractiveFetch`, `legacyEnqueueVideoMessage`, `TelegramMediaFileReference`, plus assorted dead public TelegramCore/AccountContext SecureId entry points.
- Delete entire dead modules: `LegacyDataImport`, `TonBinding`, `SpotlightSupport`, `SvgRendering`, third-party `AppCenter`/`VectorPlus`/`SwiftColor`/`SwiftSVG`.
- Drop orphan `//submodules/Postbox` BUILD deps across 3 cleanup rounds.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-05 14:11:06 +02:00
f84e94f507
MediaResource → EngineMediaResource refactor: wave 2
...
Drive raw `MediaResource` out of the `TelegramEngine` public facade for
photo-upload APIs, and complete a first batch of consumer-side
migrations. Behavior-preserving. The `_internal_*` Postbox-facing
functions are untouched — only the facade signatures change, bridging
inside via `_asResource()` / `EngineMediaResource(_:)`.
TelegramEngine facades migrated (signatures now take EngineMediaResource):
- TelegramEngine.Peers.uploadedPeerPhoto / uploadedPeerVideo
- TelegramEngine.Peers.updatePeerPhoto (closure param too)
- TelegramEngine.AccountData.updateAccountPhoto / updateFallbackPhoto
- TelegramEngine.Contacts.updateContactPhoto
- TelegramEngine.Auth.uploadedPeerVideo
Consumer-side changes:
- MapResourceToAvatarSizes utility: signature is now
(engine: TelegramEngine, resource: EngineMediaResource, ...). Uses
engine.resources.data(id:) internally. The submodule drops
`import Postbox` and the Bazel dep.
- AuthorizationUI: avatar-video signal retyped from
Signal<TelegramMediaResource?> to Signal<EngineMediaResource?>.
- 27 `mapResourceToAvatarSizes(postbox:...)` call sites across 5
TelegramUI/TelegramCallsUI files migrated to the new form.
Deferred:
- SaveToCameraRoll (planned Task 8) abandoned — module has three
public functions taking `postbox: Postbox` (umbrella-type leak,
banned by rule 2) and requires a full module-migration wave, not a
type swap. Reason recorded in the wave-2 plan doc.
- Other TelegramEngine facades still leaking MediaResource
(TelegramEngineStickers.uploadSticker; UploadSecureIdFile.* —
additionally leaks Postbox) flagged for a future wave.
Docs:
- CLAUDE.md: new rule 7 (TelegramCore never imports UIKit/Display,
shared with Telegram-Mac), and a new "MediaResource →
EngineMediaResource consumer migration" section describing the
wrap/unwrap helpers and the modify-in-place facade-bridging
pattern.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-17 09:07:54 +02:00
Isaacand Isaac
7013cd9fee
Merge branch 'master' into api-refactoring
...
# Conflicts:
# submodules/TelegramApi/Sources/Api0.swift
# submodules/TelegramApi/Sources/Api25.swift
# submodules/TelegramApi/Sources/Api26.swift
# submodules/TelegramApi/Sources/Api27.swift
# submodules/TelegramApi/Sources/Api28.swift
# submodules/TelegramApi/Sources/Api29.swift
# submodules/TelegramApi/Sources/Api30.swift
# submodules/TelegramApi/Sources/Api31.swift
# submodules/TelegramApi/Sources/Api32.swift
# submodules/TelegramApi/Sources/Api33.swift
# submodules/TelegramApi/Sources/Api34.swift
# submodules/TelegramApi/Sources/Api35.swift
# submodules/TelegramApi/Sources/Api36.swift
# submodules/TelegramApi/Sources/Api37.swift
# submodules/TelegramApi/Sources/Api38.swift
# submodules/TelegramApi/Sources/Api39.swift
2026-01-17 04:12:49 +08:00
Mikhail Filimonov
db93244583
update api (rarities, crafted)
2026-01-16 16:20:08 +04: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
Ilya Laktyushin
a0e96582dd
Update API [skip ci]
2025-09-19 12:20:21 +04:00
Ilya Laktyushin
fd0c7918ff
Update API
2025-04-11 12:11:48 +04:00
Ilya Laktyushin
b6f8cce7ea
Update API [skip ci]
2025-01-10 15:22:27 +04:00
Isaacand Isaac
95ffacf97c
Fix firebase
2024-05-15 19:32:06 +04:00
Ilya Laktyushin
06d5377bd4
Update API
2024-04-04 02:41:40 +04:00
Isaacand Isaac
ef12bf9ce6
Chat links and other features
2024-03-23 00:00:08 +04:00
Ilya Laktyushin
8279db283c
Update API [skip ci]
2024-03-18 23:53:29 +04:00
Isaacand Isaac
fc8857d916
Update API
2024-03-18 19:23:58 +04:00
Isaacand Isaac
7966993955
Business fixes
2024-03-05 15:32:59 +04:00
Isaacand Isaac
aa4ca00cb0
[WIP] Business
2024-02-27 16:20:37 +04:00
Isaacand Isaac
50339b3c4c
[WIP] Business
2024-02-23 23:12:28 +04:00
Isaacand Isaac
6ed9cef40a
[WIP] Quick replies
2024-02-23 15:26:33 +04:00
Isaacand Isaac
f259829c8a
[WIP] Business
2024-02-20 14:45:25 +04:00
Isaacand Isaac
f5b039e556
Update colors API
2023-11-22 19:02:11 +04:00
Isaacand Isaac
66b3d8b874
[WIP] Colored profiles
2023-11-22 01:05:47 +04:00
Aliand Ali
bc576aab86
Fix push in change number flow
2023-11-14 16:41:10 +04:00
Ilya Laktyushin
137c3d9101
Update API
2023-10-16 13:20:46 +04:00
Aliand Ali
f3ee06dd32
Stories
2023-07-07 02:03:11 +04:00
Aliand Ali
f2d01c4f8a
Push token invalidation
2023-02-10 22:17:28 +04:00
Ilya Laktyushin
29c7eb0cc0
Translation improvements
2023-01-23 21:10:27 +04:00
Ilya Laktyushin
125ae0f124
Update API [skip ci]
2023-01-17 20:03:49 +04:00
Ilya Laktyushin
47ffcd2e4d
Update API [skip ci]
2022-12-13 17:42:32 +04:00
Aliand Ali
7020c5ed05
Status and reaction improvements
2022-09-05 03:57:37 +04:00
Aliand Ali
fe3715bd90
Update API
2022-09-02 01:07:59 +04:00
Aliand Ali
ffe00ac2e1
Reaction improvements
2022-08-19 22:51:12 +03:00
Aliand Ali
feb899920c
[WIP ]Emoji statuses
2022-08-09 22:58:03 +04:00
Aliand Ali
04ea87c1e3
[WIP] Emoji statuses
2022-08-05 23:16:30 +04:00
Ilya Laktyushin
a22cf29e19
Various fixes
2022-06-21 15:57:37 +05:00
Aliand Ali
1a04fb4408
Refactor SyncCore back into TelegramCore
2021-07-21 21:43:20 +02:00
Aliand Ali
d4572a9248
Refactoring
2021-07-18 01:03:43 +02:00
Aliand Ali
b4f35689f0
Refactoring
2021-07-08 02:35:51 +04:00
Aliand Ali
ad5d4f5c75
Refactoring [skip ci]
2021-07-05 01:08:38 +04:00
overtake
45b0d98156
update visibility [skip ci]
2021-04-20 18:19:10 +04:00
Aliand Ali
5684efc505
Refactoring
2021-04-18 12:37:25 +04:00