mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: removes deprecated code (#23183)
This commit is contained in:
parent
0afddca0b9
commit
2d8a38f883
@ -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" });
|
||||
|
@ -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) {
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user