Skip to content

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

UX: removes per channel context of favorites emojis (#31671)

Joffrey JAFFEUXfb76696f4582
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-composer.js b/plugins/chat/assets/javascripts/discourse/components/chat-composer.js
index bc7ce11feb4..9b2735a6c96 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-composer.js
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-composer.js
@@ -536,7 +536,7 @@ export default class ChatComposer extends Component {
identifier: "emoji-picker",
groupIdentifier: "emoji-picker",
component: EmojiPickerDetached,
- context: `channel_${this.args.channel.id}`,
+ context: "chat",
modalForMobile: true,
data: {
didSelectEmoji: (emoji) => {
diff --git a/plugins/chat/assets/javascripts/discourse/lib/chat-message-interactor.js b/plugins/chat/assets/javascripts/discourse/lib/chat-message-interactor.js
index c4adc0b180c..2afa8281bef 100644
--- a/plugins/chat/assets/javascripts/discourse/lib/chat-message-interactor.js
+++ b/plugins/chat/assets/javascripts/discourse/lib/chat-message-interactor.js
@@ -65,7 +65,7 @@ export default class ChatemojiReactions {
.filter(Boolean);
return this.emojiStore
- .favoritesForContext(`channel_${this.message.channel.id}`)
+ .favoritesForContext("chat")
.concat(defaultReactions)
.slice(0, 3)
.map(
@@ -413,7 +413,7 @@ export default class ChatemojiReactions {
this.interactedChatMessage.emojiPickerOpen = false;
},
data: {
- context: `channel_${this.message.channel.id}`,
+ context: "chat",
didSelectEmoji: (emoji) => {
this.selectReaction(emoji);
},