Skip to content

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

DEV: Add a missing service injection (#28890)

Jarek Radosz4d484d89d008
diff --git a/plugins/chat/assets/javascripts/discourse/services/chat-emoji-reaction-store.js b/plugins/chat/assets/javascripts/discourse/services/chat-emoji-reaction-store.js
index 4edf04b369e..86d3e9df315 100644
--- a/plugins/chat/assets/javascripts/discourse/services/chat-emoji-reaction-store.js
+++ b/plugins/chat/assets/javascripts/discourse/services/chat-emoji-reaction-store.js
@@ -1,10 +1,14 @@
// This class is adapted from emoji-store class in core. We want to maintain separate emoji store for reactions in chat plugin.
// https://github.com/discourse/discourse/blob/892f7e0506f3a4d40d9a59a4c926ff0a2aa0947e/app/assets/javascripts/discourse/app/services/emoji-store.js
-import Service from "@ember/service";
+import Service, { service } from "@ember/service";
+import { disableImplicitInjections } from "discourse/lib/implicit-injections";
import KeyValueStore from "discourse/lib/key-value-store";
+@disableImplicitInjections
export default class ChatEmojiReactionStore extends Service {
+ @service siteSettings;
+
STORE_NAMESPACE = "discourse_chat_emoji_reaction_";
MAX_DISPLAYED_EMOJIS = 20;
MAX_TRACKED_EMOJIS = this.MAX_DISPLAYED_EMOJIS * 2;
diff --git a/plugins/chat/test/javascripts/unit/lib/chat-emoji-reaction-store-test.js b/plugins/chat/test/javascripts/unit/lib/chat-emoji-reaction-store-test.js
index e07d1c9b217..0eb98423452 100644
--- a/plugins/chat/test/javascripts/unit/lib/chat-emoji-reaction-store-test.js
+++ b/plugins/chat/test/javascripts/unit/lib/chat-emoji-reaction-store-test.js
@@ -11,7 +11,6 @@ module("Discourse Chat | Unit | chat-emoji-reaction-store", function (hooks) {
"service:chat-emoji-reaction-store"
);
- this.chatEmojiReactionStore.siteSettings = this.siteSettings;
this.chatEmojiReactionStore.reset();
});