mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
DEV: /channel
-> /c
chat route rename (#19782)
* DEV: Rnemae channel path to just c Also swap the channel id and channel slug params to be consistent with core. * linting * channel_path * params in wrong order * Drop slugify helper and channel route without slug * Request slug and route models through the channel model if possible * Add client side redirection for backwards-compatibility Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
This commit is contained in:
@ -59,7 +59,7 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
|
||||
end
|
||||
expect(find("#quick-access-chat-notifications")).to have_link(
|
||||
I18n.t("js.notifications.popup.direct_message_chat_mention.direct"),
|
||||
href: "/chat/channel/#{dm_channel_1.id}/#{other_user.username}?messageId=#{message.id}",
|
||||
href: "/chat/c/#{other_user.username}/#{dm_channel_1.id}?messageId=#{message.id}",
|
||||
)
|
||||
end
|
||||
end
|
||||
@ -100,7 +100,7 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
|
||||
identifier: "@#{group.name}",
|
||||
channel: channel_1.name,
|
||||
),
|
||||
href: "/chat/channel/#{channel_1.id}/#{channel_1.slug}?messageId=#{message.id}",
|
||||
href: "/chat/c/#{channel_1.slug}/#{channel_1.id}?messageId=#{message.id}",
|
||||
)
|
||||
end
|
||||
end
|
||||
@ -126,7 +126,7 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
|
||||
|
||||
expect(find("#quick-access-chat-notifications")).to have_link(
|
||||
I18n.t("js.notifications.popup.chat_mention.direct", channel: channel_1.name),
|
||||
href: "/chat/channel/#{channel_1.id}/#{channel_1.slug}?messageId=#{message.id}",
|
||||
href: "/chat/c/#{channel_1.slug}/#{channel_1.id}?messageId=#{message.id}",
|
||||
)
|
||||
end
|
||||
end
|
||||
@ -153,7 +153,7 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
|
||||
identifier: "@all",
|
||||
channel: channel_1.name,
|
||||
),
|
||||
href: "/chat/channel/#{channel_1.id}/#{channel_1.slug}?messageId=#{message.id}",
|
||||
href: "/chat/c/#{channel_1.slug}/#{channel_1.id}?messageId=#{message.id}",
|
||||
)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user