Skip to content

TelegramCore: publish incoming reactions to your stories - #2394

Open
dallo28 wants to merge 1 commit into
TelegramMessenger:masterfrom
dallo28:story-reaction-notifications
Open

dallo28 wants to merge 1 commit into
TelegramMessenger:masterfrom
dallo28:story-reaction-notifications

Conversation

@dallo28

@dallo28 dallo28 commented Oct 24, 2026

Copy link
Copy Markdown

Summary

TelegramCore parses updateNewStoryReaction but drops it in the update switch, so apps that build notifications from the update stream cannot see reactions to their stories. iOS doesn't notice, because it shows these notifications from the PUSH_REACT_STORY push. The macOS app has no push delivery and depends on the update stream.

This PR passes the update through to a new public signal, using the same path as joinChatWebViewDecisions:

  • AccountStateManagementUtils: updateNewStoryReaction is converted into a StoryReactionNotification (story id, reacting peer, reaction) and added to the mutable state.
  • AccountMutableState / AccountFinalStateEvents: carry the new events through branching, merging and replay.
  • AccountStateManager.storyReactionNotifications: a new public signal, next to reactionNotifications for messages.
  • StoryReactionNotification: a new public struct in Stories.swift.

Nothing is stored, and iOS behaviour is unchanged because nothing on iOS subscribes to the signal.

Testing

Tested in a macOS build that uses this TelegramCore. When another account reacted to one of my active stories, the signal fired once per update with the correct story id and emoji. The reacting peer was already in Postbox, coming from the same update container, so the client can show their name without an extra request.

updateNewStoryReaction was parsed but dropped. It now reaches a public
AccountStateManager.storyReactionNotifications signal with the story id,
the reacting peer and the reaction, so clients without push delivery
(macOS) can notify about reactions to their stories.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant