diff --git a/app/soapbox/features/chats/chat_room.js b/app/soapbox/features/chats/chat_room.js index b10ff5470..e6df1953d 100644 --- a/app/soapbox/features/chats/chat_room.js +++ b/app/soapbox/features/chats/chat_room.js @@ -4,14 +4,22 @@ import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; +import Avatar from 'soapbox/components/avatar'; +import { acctFull } from 'soapbox/utils/accounts'; import { fetchChat } from 'soapbox/actions/chats'; import ChatBox from './components/chat_box'; -import Column from 'soapbox/features/ui/components/column'; +import Column from 'soapbox/components/column'; +import ColumnBackButton from 'soapbox/components/column_back_button'; +import { makeGetChat } from 'soapbox/selectors'; -const mapStateToProps = (state, { params }) => ({ - me: state.get('me'), - chat: state.getIn(['chats', params.chatId]), -}); +const mapStateToProps = (state, { params }) => { + const getChat = makeGetChat(); + + return { + me: state.get('me'), + chat: getChat(state, { id: params.chatId }), + }; +}; export default @connect(mapStateToProps) @injectIntl @@ -42,9 +50,19 @@ class ChatRoom extends ImmutablePureComponent { render() { const { chat } = this.props; if (!chat) return null; + const account = chat.get('account'); return ( +
+ +
+ +
+ @{acctFull(account)} +
+
+