about summary refs log tree commit diff
path: root/app/javascript/mastodon/reducers/compose.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/mastodon/reducers/compose.js')
-rw-r--r--app/javascript/mastodon/reducers/compose.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js
index fc6d5f30f..e683a9c1a 100644
--- a/app/javascript/mastodon/reducers/compose.js
+++ b/app/javascript/mastodon/reducers/compose.js
@@ -207,11 +207,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' })));
   }
 };