Add ability to override username and icon for posts from incoming webhooks.

Этот коммит содержится в:
JoramWilander
2015-10-02 11:08:00 -04:00
родитель f0c8019da4
Коммит 11903a3834
5 изменённых файлов: 54 добавлений и 8 удалений

Просмотреть файл

@@ -516,8 +516,19 @@ export default class PostList extends React.Component {
sameRoot = utils.isComment(post) && (prevPost.id === post.root_id || prevPost.root_id === post.root_id);
// we only hide the profile pic if the previous post is not a comment, the current post is not a comment, and the previous post was made by the same user as the current post
hideProfilePic = (prevPost.user_id === post.user_id) && !utils.isComment(prevPost) && !utils.isComment(post);
// hide the profile pic if:
// the previous post was made by the same user as the current post,
// the previous post is not a comment,
// the current post is not a comment,
// the current profile pic is not overridden
// and the previous profile pic is not overridden
if ((prevPost.user_id === post.user_id) &&
!utils.isComment(prevPost) &&
!utils.isComment(post) &&
(!post.props || !post.props.override_icon_url) &&
(!prevPost.props || !prevPost.props.override_icon_url)) {
hideProfilePic = true;
}
}
// check if it's the last comment in a consecutive string of comments on the same post