Commit Graph
115 Commits
Author SHA1 Message Date
isaacisaacClaude Opus 4.8
3ed8c926a8 Custom emoji in markdown rich messages (send + round-trip)
Parse custom emoji into RichText.textCustomEmoji when sending markdown
rich messages, and round-trip them through edit, copy, and paste using a
shared tg://emoji?id=<fileId> markdown-link marker.

- Send: rewrite each customEmoji input attribute into a
  [<alt>](tg://emoji?id=<fileId>) marker before the CommonMark parse, then
  intercept the marker URL afterward to emit .textCustomEmoji. Only rich
  messages are affected; a custom emoji alone stays on the entity path.
- Reverse: InstantPageToMarkdown (whole-message copy + edit reconstruction)
  and InstantPageMultiTextAdapter (selection copy) emit the marker;
  edit-load and chat paste reattach it as a live customEmoji attribute.
- Marker helpers shared in TextFormat/CustomEmojiMarkdownMarker.swift.
- Rich sends now pass inlineStickers so recipients can fetch the files.

Follow-up to verify at runtime: recipient rendering goes out with
Api.InputRichMessage.documents: nil; if recipients see only the fallback
glyph, populate documents: in apiInputRichMessage().

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 17:51:37 +02: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
isaacisaacClaude Opus 4.7
86d1456552 Postbox -> TelegramEngine waves 107-137 (squashed)
31 waves of consumer-side migration from `import Postbox` to TelegramEngine
typealiases. Net: 173 import drops + 39 BUILD-dep drops + 1 new typealias
(`EngineStoryId = StoryId`, wave 113).

Wave shapes used:
- Orphan-import sweeps (107, 108, 128): drop `import Postbox` from files
  whose only Postbox-symbol reference was the import line itself, then
  resolve build failures. Methodology requires token-level (`grep -oE`)
  filtering, not line-level, to avoid masking real Postbox usage on lines
  that also contain `Namespaces.X` references.
- Identifier-swap mini-waves (109-127, 129-134, 136-137): rename
  Postbox-typealiased identifiers to engine equivalents
  (PeerId -> EnginePeer.Id, MessageId -> EngineMessage.Id,
  MediaId -> EngineMedia.Id, MessageIndex -> EngineMessage.Index,
  StoryId -> EngineStoryId, ItemCollectionId -> EngineItemCollectionId,
  PreferencesEntry -> EnginePreferencesEntry,
  FetchResourceSourceType/Error -> EngineFetchResourceSourceType/Error,
  MemoryBuffer -> EngineMemoryBuffer, MessageTags -> EngineMessage.Tags,
  MessageAttribute -> EngineMessage.Attribute,
  TempBox -> EngineTempBox).
- Asset-string FP-only orphans (124).
- Typealias addition + drain (113): added `EngineStoryId` typealias to
  TelegramCore, then drained 3+11 consumer sites.

Hard blockers identified during these waves (must restore `import Postbox`
when present): MediaResource[A-Za-z]* (any suffix -- the literal
`MediaResource` matches don't catch MediaResourceData/MediaResourceId/etc.),
Postbox/MediaBox/MediaResource raw types, PostboxCoding/PostboxEncoder/
PostboxDecoder, TempBoxFile, ValueBoxKey, PostboxView, combinedView,
HashFunctions, postboxLog, openPostbox, declareEncodable, PeerView,
MessageHistoryView, MessageHistoryThreadData, CachedPeerData, RenderedPeer,
SelectivePrivacyPeer, SimpleDictionary, ItemCollectionInfosView,
ItemCollectionItem, ItemCollectionItemIndex, ItemCollectionViewEntryIndex,
ChatListIndex, ChatListEntrySummaryComponents, CodableEntry,
MessageHistoryThread, MessageHistoryAnchorIndex,
MessageHistoryEntryLocation, PeerStoryStats, PeerNameIndex,
PeerSummaryCounterTags, ChatListTotalUnreadStateCategory/Stats,
arePeersEqual. Protocol-shape blockers: bare `Peer`/`Message`/`Media`
in function signatures, generic args, enum-case payloads, or dict value
types (e.g., `[PeerId: Peer]`, `case messages([Message])`,
`Signal<(Peer?, ...), NoError>`).

`replace_all PeerId -> EnginePeer.Id` is dangerous: mangles compound
names like `failedPeerId`, `ContactListPeerId`, `nextRemoteMediaId`,
`replyToMessageId`. Pre-flight grep `\b[a-z][a-zA-Z]*PeerId\b` and only
replace_all if 0 matches.

Also removes unneeded design/plan docs from a separate (link-highlighting)
feature branch:
- docs/superpowers/plans/2026-05-02-link-highlighting-modern-path-fixes.md
- docs/superpowers/specs/2026-05-02-link-highlighting-modern-path-fixes-design.md

Squashed commits: 6d82c2980d..e6de5d53a3 (59 commits, including
per-wave content commits and per-wave CLAUDE.md bumps).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 10:28:50 +02:00
Ilya Laktyushin 837acfa784 Various fixes 2026-04-29 04:26:58 +02:00
Ilya Laktyushin 7ab4685940 Various fixes 2026-04-29 03:52:19 +02:00
isaacandisaac 027ac77ad7 Various improvements 2026-04-28 16:58:04 +04:00
Ilya Laktyushin 6b78a35695 Various fixes 2026-04-25 19:53:39 +02:00
Ilya Laktyushin 5f7bcb7746 Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2026-04-25 17:41:48 +02:00
Ilya Laktyushin 9c15b8c27d Various improvements 2026-04-25 17:32:26 +02:00
isaacandisaac f5cb1391aa Merge commit '96b1432434205e2d09d7615bde1402d762ac2b8c' 2026-04-24 11:24:47 +04:00
isaacisaacClaude Opus 4.7
8408e0ae19 Postbox -> TelegramEngine waves 27-36
Consumer-sweep, facade-addition, and Peer→EnginePeer migrations:

- Wave 27: preferencesView consumer sweep
- Wave 28: resourceData consumer sweep
- Wave 29: resourceStatus consumer sweep
- Wave 30: _asStatus() bridge cleanup
- Wave 31: unused-import sweep re-run
- Wave 32: resourceStatus residue sweep
- Wave 33: loadedPeerWithId consumer sweep
- Wave 34: FoundPeer.peer Peer -> EnginePeer
- Wave 35: SendAsPeer.peer Peer -> EnginePeer
- Wave 36: ContactListPeer.peer Peer -> EnginePeer

Also includes per-wave specs, implementation plans, outcome logs, and
a CLAUDE.md wave-counter update.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 11:24:13 +04:00
Ilya Laktyushin 96b1432434 Various improvements 2026-04-24 04:55:22 +02:00
Ilya Laktyushin f41630083a Various improvements 2026-04-24 03:16:14 +02:00
Ilya Laktyushin d88a29b378 Various improvements 2026-04-18 08:41:08 +02:00
Ilya Laktyushin 8f1e024aef Various fixes 2026-04-15 23:12:53 +02:00
IsaacandIsaac c9add89043 More ai button fixes 2026-03-27 22:33:54 +08:00
IsaacandIsaac f48617fbec Update 2026-03-25 00:18:11 +08:00
IsaacandIsaac 93bf472472 Text selection 2026-03-24 22:51:44 +08:00
IsaacandIsaac a0a2f9f6bf Various improvements 2026-03-24 16:47:36 +08:00
IsaacandIsaac 28323206b3 Temp 2026-03-22 01:41:58 +03:00
IsaacandIsaac bc7858ad2b AI editing 2026-03-20 18:23:45 +01:00
IsaacandIsaac a2d5c530a5 Various improvements 2026-03-18 00:27:13 +01:00
IsaacandIsaac 72fbe5d7a7 Various improvements 2026-03-13 14:54:44 +01:00
Ilya Laktyushin dca6b5f145 Various improvements 2026-03-12 13:51:27 +01:00
Ilya Laktyushin ed6643e82c Fix recording cancel button hit testing 2026-03-07 01:06:00 +01:00
Ilya Laktyushin ad3b5bb0d8 Various fixes 2026-02-27 20:42:49 +04:00
Ilya Laktyushin f852dca2c8 Manual date formatting 2026-02-24 13:07:08 +04:00
Ilya Laktyushin d9d1210c1d Various improvements 2026-02-19 21:53:26 +04:00
IsaacandIsaac 26cc304ca0 Fix bg 2026-02-17 10:19:02 +04:00
IsaacandIsaac 37a744a26c Merge branch 'temp-10'
# Conflicts:
#	submodules/DebugSettingsUI/Sources/DebugController.swift
2026-02-11 22:07:23 +04:00
IsaacandIsaac dde740bfe8 Various improvements 2026-02-11 22:04:54 +04:00
IsaacandIsaac 6ed54e991b Cherry-pick fixes 2026-02-09 23:03:51 +04:00
IsaacandIsaac 0afb17091b Various improvements 2026-02-09 22:55:28 +04:00
IsaacandIsaac a1c3b7a588 Fix send button blur 2026-02-06 17:49:43 +04:00
IsaacandIsaac 45b1306274 Various improvements 2026-02-06 15:18:17 +04:00
IsaacandIsaac 5b27ca9d4c Various improvements 2026-01-30 23:53:55 +08:00
Ilya Laktyushin 15ca7254fb Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios 2026-01-27 22:24:42 +04:00
Ilya Laktyushin 142d59cf8f Various improvements 2026-01-27 22:24:31 +04:00
IsaacandIsaac efe000e9e3 Fix crashes 2026-01-28 01:06:37 +08:00
IsaacandIsaac ca6fdc1629 Glass 2026-01-25 00:31:18 +08:00
IsaacandIsaac 2db08cde89 Glass 2026-01-13 19:21:49 +04:00
IsaacandIsaac c9863f26f1 Fix attachment icon 2025-12-30 00:31:11 +08:00
IsaacandIsaac 4a13c3830a Glass 2025-12-26 20:29:30 +08:00
IsaacandIsaac cd436e8210 Glass 2025-12-01 22:13:33 +08:00
IsaacandIsaac 5e26b246bd [WIP] Tab bar and search 2025-11-22 03:17:19 +08:00
IsaacandIsaac 888b12405b Filter consecutive newlines 2025-11-14 21:19:08 +08:00
IsaacandIsaac 70a0f01951 Fix view once 2025-11-14 05:25:18 +08:00
IsaacandIsaac 789f9e29c9 Stories 2025-11-13 00:25:29 +08:00
IsaacandIsaac f2f1f0db35 Fix glass 2025-11-12 01:43:59 +08:00