Chats: improve display of links and emoji

loading-indicator-on-tls^2
Alex Gleason 2020-08-26 00:33:26 -05:00
rodzic a296e6fcd1
commit 5fc8b3ff3d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -9,6 +9,7 @@ import { acctFull } from 'soapbox/utils/accounts';
import IconButton from 'soapbox/components/icon_button';
import { closeChat, toggleChat, fetchChatMessages, sendChatMessage } from 'soapbox/actions/chats';
import { List as ImmutableList } from 'immutable';
import emojify from 'soapbox/features/emoji/emoji';
const mapStateToProps = (state, { pane }) => ({
me: state.get('me'),
@ -122,9 +123,10 @@ class ChatWindow extends ImmutablePureComponent {
<div className='chat-messages'>
{chatMessages.map(chatMessage => (
<div className={`chat-message${me === chatMessage.get('account_id') ? ' chat-message--me' : ''}`} key={chatMessage.get('id')}>
<span className='chat-message__bubble'>
{chatMessage.get('content')}
</span>
<span
className='chat-message__bubble'
dangerouslySetInnerHTML={{ __html: emojify(chatMessage.get('content')) }}
/>
</div>
))}
<div style={{ float: 'left', clear: 'both' }} ref={this.setMessageEndRef} />