Let emoji_store.jsx use Client APIs to resolve URLs (#5302)

Этот коммит содержится в:
Akihiko Odaki
2017-02-09 03:23:24 +09:00
коммит произвёл George Goldberg
родитель 11e0a7daa2
Коммит 432dc9239f
4 изменённых файлов: 141 добавлений и 130 удалений

Просмотреть файл

@@ -1,6 +1,7 @@
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import Client from '../client/web_client.jsx';
import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
import Constants from 'utils/constants.jsx';
import EventEmitter from 'events';
@@ -148,8 +149,7 @@ class EmojiStore extends EventEmitter {
getEmojiImageUrl(emoji) {
if (emoji.id) {
// must match Client.getCustomEmojiImageUrl
return `/api/v3/emoji/${emoji.id}`;
return Client.getCustomEmojiImageUrl(emoji.id);
}
const filename = emoji.filename || emoji.aliases[0];