summaryrefslogtreecommitdiffstats
path: root/webapp/components/webrtc/webrtc_controller.jsx
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-07-19 13:54:16 -0700
committerChristopher Speller <crspeller@gmail.com>2017-07-19 13:54:16 -0700
commit673f3a1144884373540030a8f5cca3bad3d00b63 (patch)
treea7555e741730e9af34b56b194aac3c05b5ab206a /webapp/components/webrtc/webrtc_controller.jsx
parent23a59b03dd272ea26878622a3f46576fcf9e59c8 (diff)
downloadchat-673f3a1144884373540030a8f5cca3bad3d00b63.tar.gz
chat-673f3a1144884373540030a8f5cca3bad3d00b63.tar.bz2
chat-673f3a1144884373540030a8f5cca3bad3d00b63.zip
PLT-6689: fix user image requests (#6946)
* fix user image requests * fix eslint errors and a few more cache busters
Diffstat (limited to 'webapp/components/webrtc/webrtc_controller.jsx')
-rw-r--r--webapp/components/webrtc/webrtc_controller.jsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/webapp/components/webrtc/webrtc_controller.jsx b/webapp/components/webrtc/webrtc_controller.jsx
index 650a8dd9e..9a6dcb94e 100644
--- a/webapp/components/webrtc/webrtc_controller.jsx
+++ b/webapp/components/webrtc/webrtc_controller.jsx
@@ -5,7 +5,6 @@ import UserStore from 'stores/user_store.jsx';
import ChannelStore from 'stores/channel_store.jsx';
import WebrtcStore from 'stores/webrtc_store.jsx';
-import {Client4} from 'mattermost-redux/client';
import WebSocketClient from 'client/web_websocket_client.jsx';
import Janus from 'janus';
@@ -84,14 +83,14 @@ export default class WebrtcController extends React.Component {
const currentUser = UserStore.getCurrentUser();
const remoteUser = UserStore.getProfile(props.userId);
- const remoteUserImage = Client4.getUsersRoute() + '/' + remoteUser.id + '/image?time=' + remoteUser.last_picture_update;
+ const remoteUserImage = Utils.imageURLForUser(remoteUser);
this.state = {
windowWidth: Utils.windowWidth(),
windowHeight: Utils.windowHeight(),
channelId: ChannelStore.getCurrentId(),
currentUser,
- currentUserImage: Client4.getUsersRoute() + '/' + currentUser.id + '/image?time=' + currentUser.last_picture_update,
+ currentUserImage: Utils.imageURLForUser(currentUser),
remoteUserImage,
localMediaLoaded: false,
isPaused: false,
@@ -133,7 +132,7 @@ export default class WebrtcController extends React.Component {
(nextProps.userId !== this.props.userId) ||
(nextProps.isCaller !== this.props.isCaller)) {
const remoteUser = UserStore.getProfile(nextProps.userId);
- const remoteUserImage = Client4.getUsersRoute() + '/' + remoteUser.id + '/image?time=' + remoteUser.last_picture_update;
+ const remoteUserImage = Utils.imageURLForUser(remoteUser);
this.setState({
error: null,
remoteUserImage