summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_right.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-07-20 18:06:01 -0400
committerChristopher Speller <crspeller@gmail.com>2015-07-20 18:06:01 -0400
commita820b67468a13f83098d5d441e524aa7dc70e6e3 (patch)
tree42cdfe48c078e6a8c6915c06cce106c8bc9579d4 /web/react/components/post_right.jsx
parent4eb061d29cb6fdc35e4793c8d55ac593be1e8aef (diff)
parent12c19e3390fa501b25b1b746ddc3f48e525d7fff (diff)
downloadchat-a820b67468a13f83098d5d441e524aa7dc70e6e3.tar.gz
chat-a820b67468a13f83098d5d441e524aa7dc70e6e3.tar.bz2
chat-a820b67468a13f83098d5d441e524aa7dc70e6e3.zip
Merge pull request #211 from rgarmsen2295/mm-1186
MM-1186 Adds channel name to RHS comment threads
Diffstat (limited to 'web/react/components/post_right.jsx')
-rw-r--r--web/react/components/post_right.jsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/react/components/post_right.jsx b/web/react/components/post_right.jsx
index 024bff26c..581a1abe9 100644
--- a/web/react/components/post_right.jsx
+++ b/web/react/components/post_right.jsx
@@ -68,6 +68,7 @@ RootPost = React.createClass({
var filenames = this.props.post.filenames;
var isOwner = UserStore.getCurrentId() == this.props.post.user_id;
var timestamp = UserStore.getProfile(this.props.post.user_id).update_at;
+ var channel = ChannelStore.get(this.props.post.channel_id);
var type = "Post";
if (this.props.post.root_id.length > 0) {
@@ -79,6 +80,10 @@ RootPost = React.createClass({
currentUserCss = "current--user";
}
+ if (channel) {
+ channelName = (channel.type === 'D') ? "Private Message" : channel.display_name;
+ }
+
if (filenames) {
var postFiles = [];
var images = [];
@@ -118,6 +123,7 @@ RootPost = React.createClass({
return (
<div className={"post post--root " + currentUserCss}>
+ <div className="post-right-channel__name">{ channelName }</div>
<div className="post-profile-img__container">
<img className="post-profile-img" src={"/api/v1/users/" + this.props.post.user_id + "/image?time=" + timestamp} height="36" width="36" />
</div>