Skip to content

A platform for community discussion. Free, open, simple.

DEV: removes deprecated code (#23183)

Joffrey JAFFEUX2d8a38f883cd
diff --git a/plugins/chat/assets/javascripts/discourse/chat-route-map.js b/plugins/chat/assets/javascripts/discourse/chat-route-map.js
index c762056236e..7237e535014 100644
--- a/plugins/chat/assets/javascripts/discourse/chat-route-map.js
+++ b/plugins/chat/assets/javascripts/discourse/chat-route-map.js
@@ -1,10 +1,5 @@
export default function () {
this.route("chat", { path: "/chat" }, function () {
- // TODO(roman): Remove after the 3.1 release
- this.route("channel-legacy", {
- path: "/channel/:channelId/:channelTitle",
- });
-
this.route("channel", { path: "/c/:channelTitle/:channelId" }, function () {
this.route("near-message", { path: "/:messageId" });
this.route("threads", { path: "/t" });
diff --git a/plugins/chat/assets/javascripts/discourse/routes/chat-channel-decorator.js b/plugins/chat/assets/javascripts/discourse/routes/chat-channel-decorator.js
index 62f9d9d50dd..7f0295542a2 100644
--- a/plugins/chat/assets/javascripts/discourse/routes/chat-channel-decorator.js
+++ b/plugins/chat/assets/javascripts/discourse/routes/chat-channel-decorator.js
@@ -31,19 +31,10 @@ export default function withChatChannel(extendedClass) {
return this.router.replaceWith("chat");
}
- let { messageId, channelTitle } = this.paramsFor(this.routeName);
-
- // messageId query param backwards-compatibility
- if (messageId) {
- this.router.replaceWith(
- "chat.channel",
- ...model.routeModels,
- messageId
- );
- }
+ let { channelTitle } = this.paramsFor(this.routeName);
if (channelTitle && channelTitle !== model.slugifiedTitle) {
- messageId = this.paramsFor("chat.channel.near-message").messageId;
+ const messageId = this.paramsFor("chat.channel.near-message").messageId;
const threadId = this.paramsFor("chat.channel.thread").threadId;
if (threadId) {
diff --git a/plugins/chat/lib/chat/user_notifications_extension.rb b/plugins/chat/lib/chat/user_notifications_extension.rb
index 6c73ceb1d0d..4e06689d700 100644
--- a/plugins/chat/lib/chat/user_notifications_extension.rb
+++ b/plugins/chat/lib/chat/user_notifications_extension.rb
@@ -44,19 +44,9 @@ module Chat
build_summary_for(user)
@preferences_path = "#{Discourse.base_url}/my/preferences/chat"
- # TODO(roman): Remove after the 2.9 release
- add_unsubscribe_link = UnsubscribeKey.respond_to?(:get_unsubscribe_strategy_for)
-
- if add_unsubscribe_link
- unsubscribe_key = UnsubscribeKey.create_key_for(@user, "chat_summary")
- @unsubscribe_link = "#{Discourse.base_url}/email/unsubscribe/#{unsubscribe_key}"
- opts[:unsubscribe_url] = @unsubscribe_link
- end
-
opts = {
from_alias: I18n.t("user_notifications.chat_summary.from", site_name: Email.site_title),
subject: summary_subject(user, @grouped_messages),
- add_unsubscribe_link: add_unsubscribe_link,
}
build_email(user.email, opts)
diff --git a/plugins/chat/plugin.rb b/plugins/chat/plugin.rb
index d022eecb42d..f1258b2e5af 100644
--- a/plugins/chat/plugin.rb
+++ b/plugins/chat/plugin.rb
@@ -425,7 +425,6 @@ after_initialize do
end
on(:category_updated) do |category|
- # TODO(roman): remove early return after 2.9 release.
# There's a bug on core where this event is triggered with an `#update` result (true/false)
if category.is_a?(Category) && category_channel = Chat::Channel.find_by(chatable: category)
if category_channel.auto_join_users