summaryrefslogtreecommitdiffstats
path: root/webapp/components/suggestion
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/suggestion')
-rw-r--r--webapp/components/suggestion/at_mention_provider.jsx3
-rw-r--r--webapp/components/suggestion/search_user_provider.jsx3
-rw-r--r--webapp/components/suggestion/switch_channel_provider.jsx5
3 files changed, 5 insertions, 6 deletions
diff --git a/webapp/components/suggestion/at_mention_provider.jsx b/webapp/components/suggestion/at_mention_provider.jsx
index f967da3e4..9cf32440f 100644
--- a/webapp/components/suggestion/at_mention_provider.jsx
+++ b/webapp/components/suggestion/at_mention_provider.jsx
@@ -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)}
/>
);
}
diff --git a/webapp/components/suggestion/search_user_provider.jsx b/webapp/components/suggestion/search_user_provider.jsx
index d05d42a54..f3191c408 100644
--- a/webapp/components/suggestion/search_user_provider.jsx
+++ b/webapp/components/suggestion/search_user_provider.jsx
@@ -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>
diff --git a/webapp/components/suggestion/switch_channel_provider.jsx b/webapp/components/suggestion/switch_channel_provider.jsx
index ba060d924..ac4af9c8b 100644
--- a/webapp/components/suggestion/switch_channel_provider.jsx
+++ b/webapp/components/suggestion/switch_channel_provider.jsx
@@ -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
};