Fix notification navigator not recognizing ChannelActivity notifications - #1667
Open
LuisMend12 wants to merge 3 commits into
Open
Fix notification navigator not recognizing ChannelActivity notifications#1667LuisMend12 wants to merge 3 commits into
LuisMend12 wants to merge 3 commits into
Conversation
…ations Fixes Valour-Software#1665. Channel activity ("N messages from M people") notifications carry the same PlanetId/ChannelId/SourceId/ClickUrl shape as planet mention notifications, but NotificationSource.ChannelActivity wasn't in NotificationNavigator's switch, so clicking "View" always fell through to the default case and showed "This notification doesn't have a destination." instead of opening the channel at the triggering message. The planet-channel-route case grouping is pulled into a single IsPlanetChannelRouteSource predicate (used by the switch itself) so it can be exercised directly in NotificationNavigatorTests without needing a live client/JS runtime for the rest of NavigateTo.
SigmaTel71
reviewed
Aug 22, 2026
Co-authored-by: Vitaly Orekhov <vkvo2000@vivaldi.net>
Co-authored-by: Vitaly Orekhov <vkvo2000@vivaldi.net>
SigmaTel71
approved these changes
Aug 23, 2026
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
Fixes #1665.
Channel activity notifications ("N messages from M people in ...", see
ChannelActivityService.cs) are created withSource = NotificationSource.ChannelActivityand the samePlanetId/ChannelId/SourceId/ClickUrlshape as planet mention notifications (/planetchannels/{planetId}/{channelId}/{messageId}).NotificationNavigator.NavigateTo's switch never listedChannelActivity, so it always fell through to thedefaultcase and showed "This notification doesn't have a destination." instead of opening the channel at the triggering message — exactly the "Couldn't Open Notification" report in #1665.NotificationSource.ChannelActivityto the planet-channel-route case.internal static bool IsPlanetChannelRouteSource(NotificationSource)predicate, used by the switch itself (case var source when IsPlanetChannelRouteSource(source):), so there's one source of truth and it's directly unit-testable without needing a live client/JS runtime for the rest ofNavigateTo.Test plan
Valour/Tests/Client/NotificationNavigatorTests.cs— asserts all five existing planet-route sources plus the newChannelActivityroute totrue, and DM/thread/friend/event-reminder/platform sources stayfalse.dotnet build Valour/Tests/Valour.Tests.csproj— succeeds (no new warnings/errors).dotnet testfiltered toNotificationNavigatorTests— 15/15 pass.dotnet teston the full non-DB-dependentValour.Tests.Clientnamespace (78 tests) — all pass, no regressions.