summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
Diffstat (limited to 'web/react')
-rw-r--r--web/react/components/post_right.jsx6
-rw-r--r--web/react/components/search_results.jsx2
2 files changed, 7 insertions, 1 deletions
diff --git a/web/react/components/post_right.jsx b/web/react/components/post_right.jsx
index cc6751738..9ec9d8eaf 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>
diff --git a/web/react/components/search_results.jsx b/web/react/components/search_results.jsx
index 1fd974642..643ad112b 100644
--- a/web/react/components/search_results.jsx
+++ b/web/react/components/search_results.jsx
@@ -77,7 +77,7 @@ var SearchItem = React.createClass({
var message = utils.textToJsx(this.props.post.message, {searchTerm: this.props.term, noMentionHighlight: !this.props.isMentionSearch});
var channelName = "";
- var channel = ChannelStore.get(this.props.post.channel_id)
+ var channel = ChannelStore.get(this.props.post.channel_id);
var timestamp = UserStore.getCurrentUser().update_at;
if (channel) {