985 Commits
Author SHA1 Message Date
Ilya Laktyushin e0f4655cc5 Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2026-05-29 09:24:16 +02:00
Mikhail Filimonov 366b85f770 guard bots 2026-05-28 15:17:57 +01:00
isaac 38464954b0 Update API 2026-05-24 00:24:21 +04:00
isaac 3f09a1f325 WIP 2026-05-20 00:34:25 +08:00
isaac 13a153aff2 WIP 2026-05-20 00:33:08 +08:00
Ilya Laktyushin 91eb779ae2 Merge commit 'c64653ed37ce9fe2bc74e260e9e960fcf3ab5dc1' 2026-05-14 12:45:26 +02:00
Ilya Laktyushin 7a7333edab Various improvements 2026-05-05 14:57:06 +02:00
isaacandClaude Opus 4.7 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
isaac 06d744495c Improve draft sorting 2026-04-30 12:15:57 +04:00
isaacandClaude Opus 4.7 e7662a3de5 Add typing-draft send delay
Delay outgoing messages while the peer in the same (peerId, threadId)
chat is live-typing an incoming message, gated via a new per-account
Postbox `.allTypingDrafts` view feeding a synchronous Set membership
check inside PendingMessageManager.

Postbox:
- Add `AllTypingDraftsView` tracking `Set<PeerAndThreadId>` of active
  typing drafts; expose via `PostboxViewKey.allTypingDrafts`.
- Disambiguate `PostboxViewKey` hash arms for `.typingDrafts` (constant
  prefix 23) and `.contacts` (16 → 24) to avoid runtime collisions
  with peerId-only arms and `.combinedReadState`. Hash values are
  runtime-only, so this is safe.

PendingMessageManager:
- Add `.waitingForSendGate(groupId:content:)` parking state for single
  messages and albums whose upload finished but are gated on a
  typing-draft-clearing event; update `groupId` accessor and
  `dataForPendingMessageGroup` so partially-parked albums drain on
  gate open.
- Add `.waitingForForwardSendGate` parking state for forwards (no
  associated values) so drain section (1) routes single non-grouped
  messages via `commitSendingSingleMessage` and section (3) routes
  forwards via `sendGroupMessagesContent`, avoiding the double-dispatch
  that occurred when forwards reused `.waitingForSendGate`.
- Subscribe to `.allTypingDrafts`; wire the gate at single-message,
  album, and forward send paths and at drain.
- Cleanup parked forwards on pending-message removal; snapshot
  Dictionary keys before iterating to avoid mutation during iteration.

Specs and plan documents are included under `docs/superpowers/`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-30 12:15:55 +04:00
isaac 3188c793bc Merge commit 'd25010c1cbfbacddf2482c30af805af5cb1dc1e7' 2026-04-29 16:55:40 +04:00
isaac 96089108ca Fixes 2026-04-29 16:55:37 +04:00
Ilya Laktyushin d25010c1cb Various fixes 2026-04-29 12:46:08 +02:00
isaac fb4f11e54f Roll back reply changes 2026-04-29 01:33:00 +04:00
isaac 51a7348db6 Separate failed message events between main and scheduled 2026-04-28 16:57:44 +04:00
isaac a79447e430 Remove debugging 2026-04-28 16:57:08 +04:00
isaac 511a58e51a Sticker pack improvements 2026-04-28 16:56:02 +04:00
isaac bf68a7db3d Fix forum replies 2026-04-28 01:35:23 +04:00
isaac 68a95f53f2 Various improvements 2026-04-24 23:21:05 +04:00
Ilya Laktyushin 96b1432434 Various improvements 2026-04-24 04:55:22 +02:00
isaacandClaude Opus 4.7 3559ee9f1d TelegramApi: regenerate SecretApiLayer*.swift via SwiftTL
Replaces the hand-written layer 8/46/73/101/144 files with SwiftTL
output and adds the previously-unpublished layers 17/20/23/45/66/143.
Per-layer struct names (SecretApi8, SecretApi46, ...) and public
enum case signatures are unchanged for the consumers.

The regenerated cumulative snapshots now include every constructor
declared in secret_scheme.tl, including decryptedMessageActionTyping
(layer 17) which the hand-written files had elided. Switch statements
over DecryptedMessageAction in ProcessSecretChatIncomingDecryptedOperations
gain the missing case alongside .decryptedMessageActionNoop (both are
no-ops in the consumer-side state-machine).

BUILD uses glob("Sources/**/*.swift") so no BUILD update required.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 23:02:42 +04:00
Isaac 8edaa79eda Merge commit '23c4d9474868a4a694a44fd11f84f914c13fb259' 2026-04-19 23:54:22 +02:00
Ilya Laktyushin 1fa0c7991c Various fixes 2026-04-17 11:06:56 +02:00
Isaac bbfd1ddca0 Merge commit '532a3ae3e1e6220268535100f7aeb7b2eb2918d0' 2026-04-17 09:09:55 +02:00
Ilya Laktyushin 532a3ae3e1 Various fixes 2026-04-16 21:45:26 +02:00
Isaac bf21bca206 Merge commit '31e3a7dc79a91d78d9dda66945f81c9fc3d62b8e'
# Conflicts:
#	submodules/TelegramCore/Sources/PendingMessages/PendingMessageUploadedContent.swift
#	submodules/TelegramCore/Sources/TelegramEngine/Messages/Polls.swift
#	submodules/TelegramCore/Sources/TelegramEngine/Messages/Translate.swift
2026-04-16 17:52:38 +02:00
Ilya Laktyushin 0df319742a Update API 2026-04-16 01:18:22 +02:00
Isaac 0095bfad39 Temp 2026-04-15 13:18:46 +02:00
Isaac d575824ab4 Various improvements 2026-04-10 14:30:23 +02:00
Isaac 001a5ed5b1 Merge commit 'b3d4c97da45b8932dbbfdde498138bf6fb152f27' 2026-03-30 19:59:16 +08:00
Isaac c73bceb797 Cleanup 2026-03-30 19:59:03 +08:00
Ilya Laktyushin f3c18e1436 Various improvements 2026-03-29 22:18:19 +02:00
Ilya Laktyushin 8d7b84caac Various fixes 2026-03-29 18:49:14 +02:00
Isaac 0b878e4d24 Various improvements 2026-03-28 00:52:16 +08:00
Isaac 8dd7b4c8e7 Temp 2026-03-27 19:30:03 +08:00
Isaac 911ebd07ab Update 2026-03-27 19:23:09 +08:00
Isaac 2907ddbe46 Unseen polls 2026-03-27 18:30:01 +08:00
Mikhail Filimonov 7354bea3e6 pass iscreator 2026-03-23 10:45:34 +01:00
Ilya Laktyushin 5ed2f0ad1e Various fixes 2026-03-23 00:17:18 +01:00
Ilya Laktyushin c165cbe434 Update API 2026-03-22 18:41:53 +01:00
Ilya Laktyushin 6519b5c84d [WIP] Polls 2026-03-17 11:12:58 +01:00
Ilya Laktyushin 2b9d97b944 Update API 2026-03-17 00:04:50 +01:00
Ilya Laktyushin b1a190f87a [WIP] Polls 2026-03-16 18:07:12 +01:00
Ilya Laktyushin b64d4a23fe Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2026-03-16 13:42:14 +01:00
Ilya Laktyushin 3a311f75bd Update API 2026-03-16 13:37:36 +01:00
Isaac 72fbe5d7a7 Various improvements 2026-03-13 14:54:44 +01:00
Mikhail Filimonov a824d97804 api update 2026-03-13 10:40:03 +01:00
Mikhail Filimonov a02f811c2a polls 2026-03-11 17:41:41 +00:00
Ilya Laktyushin c68337ef70 Update API 2026-03-08 08:49:21 +01:00
Ilya Laktyushin e3c84fce71 Various fixes 2026-02-27 14:34:18 +04:00