PLT-5118 moving to last_picture_update for the profile img (#4985)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
1aa235b10d
Коммит
e82bcea0d0
@@ -42,7 +42,7 @@ export default class SidebarHeader extends React.Component {
|
|||||||
profilePicture = (
|
profilePicture = (
|
||||||
<img
|
<img
|
||||||
className='user__picture'
|
className='user__picture'
|
||||||
src={Client.getUsersRoute() + '/' + me.id + '/image?time=' + me.update_at}
|
src={Client.getUsersRoute() + '/' + me.id + '/image?time=' + me.last_picture_update}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ export default class PopoverListMembers extends React.Component {
|
|||||||
key={'popover-member-' + i}
|
key={'popover-member-' + i}
|
||||||
>
|
>
|
||||||
<ProfilePicture
|
<ProfilePicture
|
||||||
src={`${Client.getUsersRoute()}/${m.id}/image?time=${m.update_at}`}
|
src={`${Client.getUsersRoute()}/${m.id}/image?time=${m.last_picture_update}`}
|
||||||
width='26'
|
width='26'
|
||||||
height='26'
|
height='26'
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -150,10 +150,10 @@ export default class Post extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let timestamp = 0;
|
let timestamp = 0;
|
||||||
if (!this.props.user || this.props.user.update_at == null) {
|
if (!this.props.user || this.props.user.last_picture_update == null) {
|
||||||
timestamp = this.props.currentUser.update_at;
|
timestamp = this.props.currentUser.last_picture_update;
|
||||||
} else {
|
} else {
|
||||||
timestamp = this.props.user.update_at;
|
timestamp = this.props.user.last_picture_update;
|
||||||
}
|
}
|
||||||
|
|
||||||
let sameUserClass = '';
|
let sameUserClass = '';
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ export default class RhsComment extends React.Component {
|
|||||||
currentUserCss = 'current--user';
|
currentUserCss = 'current--user';
|
||||||
}
|
}
|
||||||
|
|
||||||
var timestamp = this.props.currentUser.update_at;
|
var timestamp = this.props.currentUser.last_picture_update;
|
||||||
|
|
||||||
let status = this.props.status;
|
let status = this.props.status;
|
||||||
if (post.props && post.props.from_webhook === 'true') {
|
if (post.props && post.props.from_webhook === 'true') {
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export default class RhsRootPost extends React.Component {
|
|||||||
var isOwner = this.props.currentUser.id === post.user_id;
|
var isOwner = this.props.currentUser.id === post.user_id;
|
||||||
var isAdmin = TeamStore.isTeamAdminForCurrentTeam() || UserStore.isSystemAdminForCurrentUser();
|
var isAdmin = TeamStore.isTeamAdminForCurrentTeam() || UserStore.isSystemAdminForCurrentUser();
|
||||||
const isSystemMessage = post.type && post.type.startsWith(Constants.SYSTEM_MESSAGE_PREFIX);
|
const isSystemMessage = post.type && post.type.startsWith(Constants.SYSTEM_MESSAGE_PREFIX);
|
||||||
var timestamp = user ? user.update_at : 0;
|
var timestamp = user ? user.last_picture_update : 0;
|
||||||
var channel = ChannelStore.get(post.channel_id);
|
var channel = ChannelStore.get(post.channel_id);
|
||||||
const flagIcon = Constants.FLAG_ICON_SVG;
|
const flagIcon = Constants.FLAG_ICON_SVG;
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export default class SearchResultsItem extends React.Component {
|
|||||||
render() {
|
render() {
|
||||||
let channelName = null;
|
let channelName = null;
|
||||||
const channel = this.props.channel;
|
const channel = this.props.channel;
|
||||||
const timestamp = UserStore.getCurrentUser().update_at;
|
const timestamp = UserStore.getCurrentUser().last_picture_update;
|
||||||
const user = this.props.user || {};
|
const user = this.props.user || {};
|
||||||
const post = this.props.post;
|
const post = this.props.post;
|
||||||
const flagIcon = Constants.FLAG_ICON_SVG;
|
const flagIcon = Constants.FLAG_ICON_SVG;
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export default class SidebarHeader extends React.Component {
|
|||||||
profilePicture = (
|
profilePicture = (
|
||||||
<img
|
<img
|
||||||
className='user__picture'
|
className='user__picture'
|
||||||
src={Client.getUsersRoute() + '/' + me.id + '/image?time=' + me.update_at}
|
src={Client.getUsersRoute() + '/' + me.id + '/image?time=' + me.last_picture_update}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class AtMentionSuggestion extends Suggestion {
|
|||||||
icon = (
|
icon = (
|
||||||
<img
|
<img
|
||||||
className='mention__image'
|
className='mention__image'
|
||||||
src={Client.getUsersRoute() + '/' + user.id + '/image?time=' + user.update_at}
|
src={Client.getUsersRoute() + '/' + user.id + '/image?time=' + user.last_picture_update}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class SearchUserSuggestion extends Suggestion {
|
|||||||
<i className='fa fa fa-plus-square'/>
|
<i className='fa fa fa-plus-square'/>
|
||||||
<img
|
<img
|
||||||
className='profile-img rounded'
|
className='profile-img rounded'
|
||||||
src={Client.getUsersRoute() + '/' + item.id + '/image?time=' + item.update_at}
|
src={Client.getUsersRoute() + '/' + item.id + '/image?time=' + item.last_picture_update}
|
||||||
/>
|
/>
|
||||||
<div className='mention--align'>
|
<div className='mention--align'>
|
||||||
<span>
|
<span>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class SwitchChannelSuggestion extends Suggestion {
|
|||||||
<div className='pull-left'>
|
<div className='pull-left'>
|
||||||
<img
|
<img
|
||||||
className='mention__image'
|
className='mention__image'
|
||||||
src={Client.getUsersRoute() + '/' + item.id + '/image?time=' + item.update_at}
|
src={Client.getUsersRoute() + '/' + item.id + '/image?time=' + item.last_picture_update}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export default function UserListRow({user, extraInfo, actions, actionProps, acti
|
|||||||
className='more-modal__row'
|
className='more-modal__row'
|
||||||
>
|
>
|
||||||
<ProfilePicture
|
<ProfilePicture
|
||||||
src={`${Client.getUsersRoute()}/${user.id}/image?time=${user.update_at}`}
|
src={`${Client.getUsersRoute()}/${user.id}/image?time=${user.last_picture_update}`}
|
||||||
status={status}
|
status={status}
|
||||||
width='32'
|
width='32'
|
||||||
height='32'
|
height='32'
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export default class UserProfile extends React.Component {
|
|||||||
let profileImg = '';
|
let profileImg = '';
|
||||||
if (this.props.user) {
|
if (this.props.user) {
|
||||||
name = Utils.displayUsername(this.props.user.id);
|
name = Utils.displayUsername(this.props.user.id);
|
||||||
profileImg = Client.getUsersRoute() + '/' + this.props.user.id + '/image?time=' + this.props.user.update_at;
|
profileImg = Client.getUsersRoute() + '/' + this.props.user.id + '/image?time=' + this.props.user.last_picture_update;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.overwriteName) {
|
if (this.props.overwriteName) {
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ export default class WebrtcNotification extends React.Component {
|
|||||||
const user = this.state.userCalling;
|
const user = this.state.userCalling;
|
||||||
if (user) {
|
if (user) {
|
||||||
const username = Utils.displayUsername(user.id);
|
const username = Utils.displayUsername(user.id);
|
||||||
const profileImgSrc = Client.getUsersRoute() + '/' + user.id + '/image?time=' + (user.update_at || new Date().getTime());
|
const profileImgSrc = Client.getUsersRoute() + '/' + user.id + '/image?time=' + (user.last_picture_update || new Date().getTime());
|
||||||
const profileImg = (
|
const profileImg = (
|
||||||
<img
|
<img
|
||||||
className='user-popover__image'
|
className='user-popover__image'
|
||||||
|
|||||||
@@ -81,14 +81,14 @@ export default class WebrtcController extends React.Component {
|
|||||||
|
|
||||||
const currentUser = UserStore.getCurrentUser();
|
const currentUser = UserStore.getCurrentUser();
|
||||||
const remoteUser = UserStore.getProfile(props.userId);
|
const remoteUser = UserStore.getProfile(props.userId);
|
||||||
const remoteUserImage = Client.getUsersRoute() + '/' + remoteUser.id + '/image?time=' + remoteUser.update_at;
|
const remoteUserImage = Client.getUsersRoute() + '/' + remoteUser.id + '/image?time=' + remoteUser.last_picture_update;
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
windowWidth: Utils.windowWidth(),
|
windowWidth: Utils.windowWidth(),
|
||||||
windowHeight: Utils.windowHeight(),
|
windowHeight: Utils.windowHeight(),
|
||||||
channelId: ChannelStore.getCurrentId(),
|
channelId: ChannelStore.getCurrentId(),
|
||||||
currentUser,
|
currentUser,
|
||||||
currentUserImage: Client.getUsersRoute() + '/' + currentUser.id + '/image?time=' + currentUser.update_at,
|
currentUserImage: Client.getUsersRoute() + '/' + currentUser.id + '/image?time=' + currentUser.last_picture_update,
|
||||||
remoteUserImage,
|
remoteUserImage,
|
||||||
localMediaLoaded: false,
|
localMediaLoaded: false,
|
||||||
isPaused: false,
|
isPaused: false,
|
||||||
@@ -130,7 +130,7 @@ export default class WebrtcController extends React.Component {
|
|||||||
(nextProps.userId !== this.props.userId) ||
|
(nextProps.userId !== this.props.userId) ||
|
||||||
(nextProps.isCaller !== this.props.isCaller)) {
|
(nextProps.isCaller !== this.props.isCaller)) {
|
||||||
const remoteUser = UserStore.getProfile(nextProps.userId);
|
const remoteUser = UserStore.getProfile(nextProps.userId);
|
||||||
const remoteUserImage = Client.getUsersRoute() + '/' + remoteUser.id + '/image?time=' + remoteUser.update_at;
|
const remoteUserImage = Client.getUsersRoute() + '/' + remoteUser.id + '/image?time=' + remoteUser.last_picture_update;
|
||||||
this.setState({
|
this.setState({
|
||||||
error: null,
|
error: null,
|
||||||
remoteUserImage
|
remoteUserImage
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export function createDMIntroMessage(channel, centeredIntro) {
|
|||||||
<div className={'channel-intro ' + centeredIntro}>
|
<div className={'channel-intro ' + centeredIntro}>
|
||||||
<div className='post-profile-img__container channel-intro-img'>
|
<div className='post-profile-img__container channel-intro-img'>
|
||||||
<ProfilePicture
|
<ProfilePicture
|
||||||
src={Client.getUsersRoute() + '/' + teammate.id + '/image?time=' + teammate.update_at}
|
src={Client.getUsersRoute() + '/' + teammate.id + '/image?time=' + teammate.last_picture_update}
|
||||||
width='50'
|
width='50'
|
||||||
height='50'
|
height='50'
|
||||||
user={teammate}
|
user={teammate}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user