summaryrefslogtreecommitdiffstats
path: root/web/react/utils/emoticons.jsx
diff options
context:
space:
mode:
authorFlorian Orben <florian.orben@gmail.com>2015-12-01 22:40:24 +0100
committerFlorian Orben <florian.orben@gmail.com>2015-12-01 22:41:06 +0100
commit8a39d160f6e0c0626181279163c95ac88f01e0c5 (patch)
tree05e82a243dcd82893c9950c0eead1835f703a465 /web/react/utils/emoticons.jsx
parentc111777f85fc93ab18c6e28473e70c9ed2810683 (diff)
downloadchat-8a39d160f6e0c0626181279163c95ac88f01e0c5.tar.gz
chat-8a39d160f6e0c0626181279163c95ac88f01e0c5.tar.bz2
chat-8a39d160f6e0c0626181279163c95ac88f01e0c5.zip
switch to only use emoji one smileys; remove setting to switch
Diffstat (limited to 'web/react/utils/emoticons.jsx')
-rw-r--r--web/react/utils/emoticons.jsx10
1 files changed, 7 insertions, 3 deletions
diff --git a/web/react/utils/emoticons.jsx b/web/react/utils/emoticons.jsx
index 6a8ba6984..8943e9544 100644
--- a/web/react/utils/emoticons.jsx
+++ b/web/react/utils/emoticons.jsx
@@ -1,8 +1,6 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
-import * as Utils from './utils.jsx';
-
const emoticonPatterns = {
smile: /(^|\s)(:-?\))(?=$|\s)/g, // :)
wink: /(^|\s)(;-?\))(?=$|\s)/g, // ;)
@@ -135,7 +133,7 @@ export function handleEmoticons(text, tokens) {
const alias = `MM_EMOTICON${index}`;
tokens.set(alias, {
- value: `<img align="absmiddle" alt="${matchText}" class="emoji" src="${Utils.getImagePathForEmoticon(name)}" title="${matchText}" />`,
+ value: `<img align="absmiddle" alt="${matchText}" class="emoji" src="${getImagePathForEmoticon(name)}" title="${matchText}" />`,
originalText: fullMatch
});
@@ -156,3 +154,9 @@ export function handleEmoticons(text, tokens) {
return output;
}
+export function getImagePathForEmoticon(name) {
+ if (name) {
+ return `/static/images/emoji/${name}.png`;
+ }
+ return `/static/images/emoji`;
+} \ No newline at end of file