add emoji back into messages on display

This commit is contained in:
Devin Howard 2017-01-04 12:59:40 -05:00
parent e12281ffaa
commit 0072887338

View file

@ -1,5 +1,6 @@
import React from 'react' import React from 'react'
import Autolinker from 'autolinker' import Autolinker from 'autolinker'
import Util from '../../Metamaps/Util'
const linker = new Autolinker({ newWindow: true, truncate: 50, email: false, phone: false }) const linker = new Autolinker({ newWindow: true, truncate: 50, email: false, phone: false })
@ -19,7 +20,8 @@ function formatDate(created_at) {
const Message = props => { const Message = props => {
const { user_image, user_name, message, created_at, heading } = props const { user_image, user_name, message, created_at, heading } = props
const messageHtml = {__html: linker.link(message)} const messageHtml = {__html: linker.link(Util.addEmoji(message, { emoticons: false }))}
return ( return (
<div className="chat-message"> <div className="chat-message">
<div className="chat-message-user"> <div className="chat-message-user">