PLT-6689: fix user image requests (#6946)
* fix user image requests * fix eslint errors and a few more cache busters
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
23a59b03dd
Коммит
673f3a1144
@@ -10,7 +10,6 @@ import {autocompleteUsersInChannel} from 'actions/user_actions.jsx';
|
||||
|
||||
import AppDispatcher from 'dispatcher/app_dispatcher.jsx';
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
import {Client4} from 'mattermost-redux/client';
|
||||
import {Constants, ActionTypes} from 'utils/constants.jsx';
|
||||
|
||||
import React from 'react';
|
||||
@@ -66,7 +65,7 @@ class AtMentionSuggestion extends Suggestion {
|
||||
icon = (
|
||||
<img
|
||||
className='mention__image'
|
||||
src={Client4.getUsersRoute() + '/' + user.id + '/image?time=' + user.last_picture_update}
|
||||
src={Utils.imageURLForUser(user)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import Provider from './provider.jsx';
|
||||
import {autocompleteUsersInTeam} from 'actions/user_actions.jsx';
|
||||
|
||||
import AppDispatcher from 'dispatcher/app_dispatcher.jsx';
|
||||
import {Client4} from 'mattermost-redux/client';
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
import {ActionTypes} from 'utils/constants.jsx';
|
||||
|
||||
@@ -41,7 +40,7 @@ class SearchUserSuggestion extends Suggestion {
|
||||
<i className='fa fa fa-plus-square'/>
|
||||
<img
|
||||
className='profile-img rounded'
|
||||
src={Client4.getUsersRoute() + '/' + item.id + '/image?time=' + item.last_picture_update}
|
||||
src={Utils.imageURLForUser(item)}
|
||||
/>
|
||||
<div className='mention--align'>
|
||||
<span>
|
||||
|
||||
@@ -58,7 +58,7 @@ class SwitchChannelSuggestion extends Suggestion {
|
||||
<div className='pull-left'>
|
||||
<img
|
||||
className='mention__image'
|
||||
src={Client4.getUsersRoute() + '/' + channel.id + '/image?time=' + channel.last_picture_update}
|
||||
src={Utils.imageURLForUser(channel)}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
@@ -239,7 +239,8 @@ export default class SwitchChannelProvider extends Provider {
|
||||
name: user.username,
|
||||
id: user.id,
|
||||
update_at: user.update_at,
|
||||
type: Constants.DM_CHANNEL
|
||||
type: Constants.DM_CHANNEL,
|
||||
last_picture_update: user.last_picture_update || 0
|
||||
},
|
||||
name: user.username
|
||||
};
|
||||
|
||||
Ссылка в новой задаче
Block a user