Repository navigation
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TelegramCore parses
updateNewStoryReactionbut 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 thePUSH_REACT_STORYpush. 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:updateNewStoryReactionis converted into aStoryReactionNotification(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 toreactionNotificationsfor messages.StoryReactionNotification: a new public struct inStories.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.