Repository navigation
feat: show source channel names on links and quotes - #49
Merged
Merged
Conversation
Clients can now send client_channel_name with client_channel when creating links and quotes. Tumble keeps the latest name for each channel in a new channels table and shows it on the web view, so a renamed channel shows its current name on all past items. The global timeline fallback now carries client fields so the name is shown there too. The OpenAPI spec documents the new field.
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
Links and quotes posted from Slack store the channel ID (e.g.
C01229ESXEH) but the web view never showed where an item came from.This adds a channel display name to the view.
channelstable (auto-migrated) mapping(client_type, client_network, client_channel)to the current name.POST /api/v1/linksandPOST /api/v1/quotesaccept an optionalclient_channel_name(a leading#is stripped). Each post updatesthe stored name, so a renamed channel shows its new name on all past
items. Failures to record the name are logged and never fail the post.
user in #channelnext to the poster; quotes show#channelunder the author. The IRC theme renders it as#channel <nick>. Applies to the timeline, search results and theempty-state global timeline fallback.
client_channel_name.Follow-up needed
The Slack bot must send
client_channel_name. Until a channel's firstpost with a name, items from it show no channel.
Testing
make testpasses, with new tests for channel upsert/rename, thename recording helper, and client fields on the global timeline.
the rendered HTML, and checked that renaming updates older items.
worth a quick look at broadsheet, corkboard, irc and slop.