Move remaining actions over to use redux and v4 endpoints (#6720)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
fe7e9d95b3
Коммит
23ccfc845c
@@ -1,7 +1,7 @@
|
||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||
// See License.txt for license information.
|
||||
|
||||
import Client from 'client/web_client.jsx';
|
||||
import {Client4} from 'mattermost-redux/client';
|
||||
import WebSocketClient from 'client/web_websocket_client.jsx';
|
||||
|
||||
import UserStore from 'stores/user_store.jsx';
|
||||
@@ -197,7 +197,7 @@ export default class WebrtcNotification extends React.Component {
|
||||
const user = this.state.userCalling;
|
||||
if (user) {
|
||||
const username = Utils.displayUsername(user.id);
|
||||
const profileImgSrc = Client.getUsersRoute() + '/' + user.id + '/image?time=' + (user.last_picture_update || new Date().getTime());
|
||||
const profileImgSrc = Client4.getUsersRoute() + '/' + user.id + '/image?time=' + (user.last_picture_update || new Date().getTime());
|
||||
const profileImg = (
|
||||
<img
|
||||
className='user-popover__image'
|
||||
|
||||
@@ -5,7 +5,7 @@ import UserStore from 'stores/user_store.jsx';
|
||||
import ChannelStore from 'stores/channel_store.jsx';
|
||||
import WebrtcStore from 'stores/webrtc_store.jsx';
|
||||
|
||||
import Client from 'client/web_client.jsx';
|
||||
import {Client4} from 'mattermost-redux/client';
|
||||
import WebSocketClient from 'client/web_websocket_client.jsx';
|
||||
import Janus from 'janus';
|
||||
|
||||
@@ -84,14 +84,14 @@ export default class WebrtcController extends React.Component {
|
||||
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const remoteUser = UserStore.getProfile(props.userId);
|
||||
const remoteUserImage = Client.getUsersRoute() + '/' + remoteUser.id + '/image?time=' + remoteUser.last_picture_update;
|
||||
const remoteUserImage = Client4.getUsersRoute() + '/' + remoteUser.id + '/image?time=' + remoteUser.last_picture_update;
|
||||
|
||||
this.state = {
|
||||
windowWidth: Utils.windowWidth(),
|
||||
windowHeight: Utils.windowHeight(),
|
||||
channelId: ChannelStore.getCurrentId(),
|
||||
currentUser,
|
||||
currentUserImage: Client.getUsersRoute() + '/' + currentUser.id + '/image?time=' + currentUser.last_picture_update,
|
||||
currentUserImage: Client4.getUsersRoute() + '/' + currentUser.id + '/image?time=' + currentUser.last_picture_update,
|
||||
remoteUserImage,
|
||||
localMediaLoaded: false,
|
||||
isPaused: false,
|
||||
@@ -133,7 +133,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 = Client.getUsersRoute() + '/' + remoteUser.id + '/image?time=' + remoteUser.last_picture_update;
|
||||
const remoteUserImage = Client4.getUsersRoute() + '/' + remoteUser.id + '/image?time=' + remoteUser.last_picture_update;
|
||||
this.setState({
|
||||
error: null,
|
||||
remoteUserImage
|
||||
|
||||
Ссылка в новой задаче
Block a user