92 Commits
Author SHA1 Message Date
isaac 13a153aff2 WIP 2026-05-20 00:33:08 +08: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 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 bf68a7db3d Fix forum replies 2026-04-28 01:35:23 +04:00
Ilya Laktyushin 1fa0c7991c Various fixes 2026-04-17 11:06:56 +02:00
Ilya Laktyushin b1a190f87a [WIP] Polls 2026-03-16 18:07:12 +01:00
Ilya Laktyushin 3a311f75bd Update API 2026-03-16 13:37:36 +01:00
Isaac e36e44ed72 Temp 2026-02-24 11:11:50 +01:00
Isaac 4f517ed01f Temp 2026-02-24 10:56:22 +01:00
IsaacandClaude Opus 4.5 61983a113a Refactor constructor use sites for types 190-199 to struct pattern
Refactored constructors include:
- maskCoords, mediaArea*, message, messageEmpty, messageService
- messageAction* (50+ action types)
- messageEntity* (20+ entity types)
- messageMedia* (20+ media types)
- messageFwdHeader, messagePeerReaction, messageExtendedMedia*

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 00:45:23 +08:00
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
Ilya Laktyushin a1f6f80888 Update API [skip ci] 2026-01-16 15:43:35 +04:00
IsaacandClaude Opus 4.5 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
Ilya Laktyushin 966182bd2f Various improvements 2025-12-29 10:05:51 +04:00
Ilya Laktyushin b04eee8289 Update API [skip ci] 2025-11-27 19:55:24 +04:00
Ilya Laktyushin 0915a42e64 Various improvements 2025-10-16 05:30:06 +04:00
Isaac f468cea13c Update API 2025-10-15 17:06:40 +08:00
Isaac b9b38e5fbf Various improvements 2025-10-11 00:56:21 +08:00
Isaac 54d2b58eb3 Updates 2025-09-30 21:52:21 +08:00
Isaac e3f7405fae Update API 2025-09-26 21:06:43 +08:00
Isaac 8c89dccf39 Update API 2025-09-26 20:05:27 +08:00
Isaac ee749050f0 Bot forums 2025-08-19 17:24:33 +02:00
Isaac 826c48a4dc Bot updates 2025-08-15 13:35:06 +02:00
Isaac 8843fbe5cb Support typing drafts 2025-08-15 09:18:11 +02:00
Ilya Laktyushin 01d90f55b1 Merge commit '2ed6f9616bdaacef6fcda7eaee497a3351651084' 2025-07-14 13:21:14 +01:00
Ilya Laktyushin b4832ff856 Update API 2025-07-14 12:50:11 +01:00
Isaac 2ed6f9616b Peer star rating 2025-07-11 14:53:02 +04:00
Isaac 3e40713aad Various improvements 2025-06-26 20:29:23 +02:00
Isaac df3e2db84c Suggested posts 2025-06-20 15:37:26 +02:00
Isaac 06eaf81fa9 [WIP] Post suggestion 2025-06-17 13:55:44 +04:00
Isaac 2c53fd2273 Update API 2025-06-13 02:15:04 +08:00
Isaac 2e53aa417f Locally update star amount on sent 2025-05-29 16:05:00 +08:00
Isaac c984cb956b Monoforums 2025-05-27 00:56:39 +08:00
Isaac 1a56afcb48 [WIP] Monoforums 2025-05-16 01:02:25 +08:00
Isaac b752a49432 Update API 2025-05-15 00:54:50 +08:00
Isaac 140efd6cfd [WIP] Monoforums 2025-05-10 18:02:55 +01:00
Isaac 0e119dd6f1 [WIP] Monoforums 2025-05-08 20:56:55 +01:00
Isaac 603d5754db [WIP] Post suggestions 2025-04-23 12:18:56 +04:00
Ilya Laktyushin 3f8152d0b1 Various fixes 2025-03-01 17:14:17 +04:00
Ilya Laktyushin 8d7f9bf372 Various improvements 2025-02-22 19:17:36 +04:00
Ilya Laktyushin 4f42e41180 Update API [skip ci] 2025-02-21 17:23:25 +04:00
Ilya Laktyushin d167aa4b0e Update API [skip ci] 2025-02-18 10:09:58 +04:00
Isaac f6fa8788f3 Update API 2025-02-15 13:17:01 +04:00
Ilya Laktyushin 2f2a27f0d2 Various improvements [skip ci] 2025-02-12 22:15:02 +04:00
Isaac 40828e9037 [WIP] UI 2025-01-21 21:08:44 +04:00
Isaac 2b9f5ed541 [WIP] Conference calls 2024-12-18 23:35:27 +08:00
Isaac caf10fe889 Various improvements 2024-10-25 11:24:06 +02:00
Ilya Laktyushin e47b5a89ef Paid media improvements 2024-06-24 04:06:57 +04:00
Isaac 825292522e Support partial multi-media re-upload 2024-06-18 13:11:52 +04:00