Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

FIX: Make get channel by name work with chatable name #857

Merged

Conversation

martin-brennan
Copy link
Contributor

We do not force all channels to have a name, so the route
to get a channel by name needs to work with the chatable
names as well (e.g. category.name and topic.fancy_title).
Note that this does not take into account DM channels where
getting them by name is kind of tricky.

The chat transcript service currently converts the channel
attribute (e.g. channel="Music Lounge") into a link using the
channel title in the /chat/chat_channels/:title format. A better
fit rather than the somewhat unreliable and tricky channel
title would be perhaps to use a channel ID instead...but that
does have its own issues for the transcript. We should discuss
internally.

We do not force all channels to have a name, so the route
to get a channel by name needs to work with the chatable
names as well (e.g. category.name and topic.fancy_title).
Note that this does not take into account DM channels where
getting them by name is kind of tricky.

The chat transcript service currently converts the channel
attribute (e.g. channel="Music Lounge") into a link using the
channel title in the /chat/chat_channels/:title format. A better
fit rather than the somewhat unreliable and tricky channel
title would be perhaps to use a channel ID instead...but that
does have its own issues for the transcript. We should discuss
internally.
martin-brennan added a commit that referenced this pull request May 16, 2022
We have run across various complications when trying to
link to a channel by channel title (see /t/66638 and
#857 for
examples) so instead we are just going to add a channel
ID to the chat quotes instead for easier linking.

This commit also improves DM channel titles for chat quotes,
which were not taken into account in the original design,
but was later allowed in 1f10fc6.
@martin-brennan martin-brennan merged commit e083547 into main May 16, 2022
@martin-brennan martin-brennan deleted the issue/make-get-channel-by-name-work-with-nameless branch May 16, 2022 08:05
martin-brennan added a commit that referenced this pull request May 17, 2022
We have run across various complications when trying to
link to a channel by channel title (see /t/66638 and
#857 for
examples) so instead we are just going to add a channel
ID to the chat quotes instead for easier linking.

This commit also improves DM channel titles for chat quotes,
which were not taken into account in the original design,
but was later allowed in 1f10fc6.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
3 participants