Repository navigation
Show Slack threads from before a person linked their account - #1061
Merged
Merged
Conversation
Before each sessions list, Slack sessions with no dashboard owner whose Slack person has since linked become theirs (owner, name, email, access frame), as their next delivery would. Linking used to show only threads with a message after it.
|
View docs preview Docs hosted with Margin |
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.
Requested by @mohamed Habib in Slack.
A Slack thread gets a dashboard owner only when a message is delivered after its Slack person links their account (
slackDelivery). Threads with no message since linking stayed out of that person's list.Now, before each sessions
list, ownerless Slack sessions whose Slack person (owner_id) has since linked are given to that person:owner_user_idand fills in a missing name or email, exactly as a delivery would;This covers everyone who already linked as well as anyone who links later. It needs no change to the deploy overlay, because it goes through
linkOfSlack.Cost: one
SELECT DISTINCT owner_idover ownerless Slack sessions per list, plus one link lookup per Slack person who has some. Rows that are already attached are never touched again.Only sessions that already have a session id (
cs_…) are included. Older threads that have no journal stay out until their next message.Tests: a new case in
computer-sessions-api.test.ts; the managed-agents computer suite passes (428/428), and so does tsc.