Fix emoji autosuggestions (#11442)

Regression from cfb2ed7823
This commit is contained in:
Eugen Rochko 2019-07-29 15:04:49 +02:00 committed by GitHub
parent 2f0820963d
commit 784c88e16d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 17 deletions

View file

@ -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' })));
}
};