about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/reducers
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/flavours/glitch/reducers')
-rw-r--r--app/javascript/flavours/glitch/reducers/compose.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js
index 3c769abe3..ee2905c9b 100644
--- a/app/javascript/flavours/glitch/reducers/compose.js
+++ b/app/javascript/flavours/glitch/reducers/compose.js
@@ -288,11 +288,11 @@ const expiresInFromExpiresAt = expires_at => {
 
 const normalizeSuggestions = (state, { accounts, emojis, tags }) => {
   if (accounts) {
-    return accounts.map(item => item.id);
+    return accounts.map(item => ({ id: item.id, type: 'account' }));
   } else if (emojis) {
-    return emojis;
+    return emojis.map(item => ({ ...item, type: 'emoji' }));
   } else {
-    return sortHashtagsByUse(state, tags);
+    return sortHashtagsByUse(state, tags.map(item => ({ ...item, type: 'hashtag' })));
   }
 };