Repository navigation
chat: failing test - the pending message activity names no account - #29835
Open
chrisnojima wants to merge 1 commit into
Open
chrisnojima wants to merge 1 commit into
chrisnojima wants to merge 1 commit into
Conversation
PostTextNonblock queues the message in the outbox before its client header has a sender, and the deliverer's outbox notifier takes the activity's uid from that header, so the pending (outbox) incoming-message activity goes out with an empty uid. The app drops chat notifications that do not name the signed-in account (#29804), so it never shows a pending message: no pending row, no sending indicator, and no deleting indicator on a message just sent. This test posts through PostTextNonblock and asserts the outbox activity names the poster.
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
A failing test only, for review on its own: the pending (outbox) message activity goes out without an account id.
Since #29804 the app drops chat notifications that don't name the signed-in account. So on desktop it never shows a message as pending: no pending row, no sending indicator, and no deleting indicator on a message just sent. The outbox notification arrives (with the outbox ordinal), and is discarded.
TestChatSrvPendingMessageActivityNamesTheAccountposts throughPostTextNonblockand asserts the outbox activity names the poster. The likely fix is one line inchat/deliverer.go: the outbox is per account (Deliverer.Start(ctx, uid)), so the notifier can use that uid instead of the record's header.Evidence
Observed in the desktop app (renderer RPC log) for one send, uid as received:
The new test compiles and is clean under
go vetandgolangci-lint --new-from-rev master. It needs kbweb (fake-user signup), which wasn't available where it was written, so it hasn't run locally: CI is where it fails.Merge Danger
Door: two-way
Blast Radius: none
A test file only.