PLT-2927/PLT-2924 Fixing issues with integration lists (#2974)
* Changed IntegrationStore to store integrations by team * Fixed regenerating a command's token not causing the UI to update * Re-added IntegrationStore.hasReceived methods
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
82e6cf785c
Коммит
d9f724f959
@@ -1203,7 +1203,7 @@ export default class Client {
|
|||||||
end(this.handleResponse.bind(this, 'listTeamCommands', success, error));
|
end(this.handleResponse.bind(this, 'listTeamCommands', success, error));
|
||||||
}
|
}
|
||||||
|
|
||||||
regenCommandToken = (commandId, suggest, success, error) => {
|
regenCommandToken = (commandId, success, error) => {
|
||||||
request.
|
request.
|
||||||
post(`${this.getCommandsRoute()}/regen_token`).
|
post(`${this.getCommandsRoute()}/regen_token`).
|
||||||
set(this.defaultHeaders).
|
set(this.defaultHeaders).
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import React from 'react';
|
|||||||
|
|
||||||
import * as AsyncClient from 'utils/async_client.jsx';
|
import * as AsyncClient from 'utils/async_client.jsx';
|
||||||
import IntegrationStore from 'stores/integration_store.jsx';
|
import IntegrationStore from 'stores/integration_store.jsx';
|
||||||
|
import TeamStore from 'stores/team_store.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
|
|
||||||
import {FormattedMessage} from 'react-intl';
|
import {FormattedMessage} from 'react-intl';
|
||||||
@@ -20,16 +21,18 @@ export default class InstalledCommands extends React.Component {
|
|||||||
this.regenCommandToken = this.regenCommandToken.bind(this);
|
this.regenCommandToken = this.regenCommandToken.bind(this);
|
||||||
this.deleteCommand = this.deleteCommand.bind(this);
|
this.deleteCommand = this.deleteCommand.bind(this);
|
||||||
|
|
||||||
|
const teamId = TeamStore.getCurrentId();
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
commands: IntegrationStore.getCommands(),
|
commands: IntegrationStore.getCommands(teamId),
|
||||||
loading: !IntegrationStore.hasReceivedCommands()
|
loading: !IntegrationStore.hasReceivedCommands(teamId)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
IntegrationStore.addChangeListener(this.handleIntegrationChange);
|
IntegrationStore.addChangeListener(this.handleIntegrationChange);
|
||||||
|
|
||||||
if (window.mm_config.EnableCommands === 'true' && this.state.loading) {
|
if (window.mm_config.EnableCommands === 'true') {
|
||||||
AsyncClient.listTeamCommands();
|
AsyncClient.listTeamCommands();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -39,9 +42,11 @@ export default class InstalledCommands extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleIntegrationChange() {
|
handleIntegrationChange() {
|
||||||
|
const teamId = TeamStore.getCurrentId();
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
commands: IntegrationStore.getCommands(),
|
commands: IntegrationStore.getCommands(teamId),
|
||||||
loading: !IntegrationStore.hasReceivedCommands()
|
loading: !IntegrationStore.hasReceivedCommands(teamId)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import React from 'react';
|
|||||||
|
|
||||||
import * as AsyncClient from 'utils/async_client.jsx';
|
import * as AsyncClient from 'utils/async_client.jsx';
|
||||||
import IntegrationStore from 'stores/integration_store.jsx';
|
import IntegrationStore from 'stores/integration_store.jsx';
|
||||||
|
import TeamStore from 'stores/team_store.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
|
|
||||||
import {FormattedMessage} from 'react-intl';
|
import {FormattedMessage} from 'react-intl';
|
||||||
@@ -19,16 +20,18 @@ export default class InstalledIncomingWebhooks extends React.Component {
|
|||||||
|
|
||||||
this.deleteIncomingWebhook = this.deleteIncomingWebhook.bind(this);
|
this.deleteIncomingWebhook = this.deleteIncomingWebhook.bind(this);
|
||||||
|
|
||||||
|
const teamId = TeamStore.getCurrentId();
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
incomingWebhooks: IntegrationStore.getIncomingWebhooks(),
|
incomingWebhooks: IntegrationStore.getIncomingWebhooks(teamId),
|
||||||
loading: !IntegrationStore.hasReceivedIncomingWebhooks()
|
loading: !IntegrationStore.hasReceivedIncomingWebhooks(teamId)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
IntegrationStore.addChangeListener(this.handleIntegrationChange);
|
IntegrationStore.addChangeListener(this.handleIntegrationChange);
|
||||||
|
|
||||||
if (window.mm_config.EnableIncomingWebhooks === 'true' && this.state.loading) {
|
if (window.mm_config.EnableIncomingWebhooks === 'true') {
|
||||||
AsyncClient.listIncomingHooks();
|
AsyncClient.listIncomingHooks();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -38,9 +41,11 @@ export default class InstalledIncomingWebhooks extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleIntegrationChange() {
|
handleIntegrationChange() {
|
||||||
|
const teamId = TeamStore.getCurrentId();
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
incomingWebhooks: IntegrationStore.getIncomingWebhooks(),
|
incomingWebhooks: IntegrationStore.getIncomingWebhooks(teamId),
|
||||||
loading: !IntegrationStore.hasReceivedIncomingWebhooks()
|
loading: !IntegrationStore.hasReceivedIncomingWebhooks(teamId)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import React from 'react';
|
|||||||
|
|
||||||
import * as AsyncClient from 'utils/async_client.jsx';
|
import * as AsyncClient from 'utils/async_client.jsx';
|
||||||
import IntegrationStore from 'stores/integration_store.jsx';
|
import IntegrationStore from 'stores/integration_store.jsx';
|
||||||
|
import TeamStore from 'stores/team_store.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
|
|
||||||
import {FormattedMessage} from 'react-intl';
|
import {FormattedMessage} from 'react-intl';
|
||||||
@@ -20,16 +21,18 @@ export default class InstalledOutgoingWebhooks extends React.Component {
|
|||||||
this.regenOutgoingWebhookToken = this.regenOutgoingWebhookToken.bind(this);
|
this.regenOutgoingWebhookToken = this.regenOutgoingWebhookToken.bind(this);
|
||||||
this.deleteOutgoingWebhook = this.deleteOutgoingWebhook.bind(this);
|
this.deleteOutgoingWebhook = this.deleteOutgoingWebhook.bind(this);
|
||||||
|
|
||||||
|
const teamId = TeamStore.getCurrentId();
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
outgoingWebhooks: IntegrationStore.getOutgoingWebhooks(),
|
outgoingWebhooks: IntegrationStore.getOutgoingWebhooks(teamId),
|
||||||
loading: !IntegrationStore.hasReceivedOutgoingWebhooks()
|
loading: !IntegrationStore.hasReceivedOutgoingWebhooks(teamId)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
IntegrationStore.addChangeListener(this.handleIntegrationChange);
|
IntegrationStore.addChangeListener(this.handleIntegrationChange);
|
||||||
|
|
||||||
if (window.mm_config.EnableOutgoingWebhooks === 'true' && this.state.loading) {
|
if (window.mm_config.EnableOutgoingWebhooks === 'true') {
|
||||||
AsyncClient.listOutgoingHooks();
|
AsyncClient.listOutgoingHooks();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -39,9 +42,11 @@ export default class InstalledOutgoingWebhooks extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleIntegrationChange() {
|
handleIntegrationChange() {
|
||||||
|
const teamId = TeamStore.getCurrentId();
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
outgoingWebhooks: IntegrationStore.getOutgoingWebhooks(),
|
outgoingWebhooks: IntegrationStore.getOutgoingWebhooks(teamId),
|
||||||
loading: !IntegrationStore.hasReceivedOutgoingWebhooks()
|
loading: !IntegrationStore.hasReceivedOutgoingWebhooks(teamId)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,14 +15,11 @@ class IntegrationStore extends EventEmitter {
|
|||||||
|
|
||||||
this.dispatchToken = AppDispatcher.register(this.handleEventPayload.bind(this));
|
this.dispatchToken = AppDispatcher.register(this.handleEventPayload.bind(this));
|
||||||
|
|
||||||
this.incomingWebhooks = [];
|
this.incomingWebhooks = new Map();
|
||||||
this.receivedIncomingWebhooks = false;
|
|
||||||
|
|
||||||
this.outgoingWebhooks = [];
|
this.outgoingWebhooks = new Map();
|
||||||
this.receivedOutgoingWebhooks = false;
|
|
||||||
|
|
||||||
this.commands = [];
|
this.commands = new Map();
|
||||||
this.receivedCommands = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addChangeListener(callback) {
|
addChangeListener(callback) {
|
||||||
@@ -37,100 +34,119 @@ class IntegrationStore extends EventEmitter {
|
|||||||
this.emit(CHANGE_EVENT);
|
this.emit(CHANGE_EVENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
hasReceivedIncomingWebhooks() {
|
hasReceivedIncomingWebhooks(teamId) {
|
||||||
return this.receivedIncomingWebhooks;
|
return this.incomingWebhooks.has(teamId);
|
||||||
}
|
}
|
||||||
|
|
||||||
getIncomingWebhooks() {
|
getIncomingWebhooks(teamId) {
|
||||||
return this.incomingWebhooks;
|
return this.incomingWebhooks.get(teamId) || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
setIncomingWebhooks(incomingWebhooks) {
|
setIncomingWebhooks(teamId, incomingWebhooks) {
|
||||||
this.incomingWebhooks = incomingWebhooks;
|
this.incomingWebhooks.set(teamId, incomingWebhooks);
|
||||||
this.receivedIncomingWebhooks = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addIncomingWebhook(incomingWebhook) {
|
addIncomingWebhook(incomingWebhook) {
|
||||||
this.incomingWebhooks.push(incomingWebhook);
|
const teamId = incomingWebhook.team_id;
|
||||||
|
const incomingWebhooks = this.getIncomingWebhooks(teamId);
|
||||||
|
|
||||||
|
incomingWebhooks.push(incomingWebhook);
|
||||||
|
|
||||||
|
this.setIncomingWebhooks(teamId, incomingWebhooks);
|
||||||
}
|
}
|
||||||
|
|
||||||
removeIncomingWebhook(id) {
|
removeIncomingWebhook(teamId, id) {
|
||||||
for (let i = 0; i < this.incomingWebhooks.length; i++) {
|
let incomingWebhooks = this.getIncomingWebhooks(teamId);
|
||||||
if (this.incomingWebhooks[i].id === id) {
|
|
||||||
this.incomingWebhooks.splice(i, 1);
|
incomingWebhooks = incomingWebhooks.filter((incomingWebhook) => incomingWebhook.id !== id);
|
||||||
break;
|
|
||||||
}
|
this.setIncomingWebhooks(teamId, incomingWebhooks);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hasReceivedOutgoingWebhooks() {
|
hasReceivedOutgoingWebhooks(teamId) {
|
||||||
return this.receivedOutgoingWebhooks;
|
return this.outgoingWebhooks.has(teamId);
|
||||||
}
|
}
|
||||||
|
|
||||||
getOutgoingWebhooks() {
|
getOutgoingWebhooks(teamId) {
|
||||||
return this.outgoingWebhooks;
|
return this.outgoingWebhooks.get(teamId) || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
setOutgoingWebhooks(outgoingWebhooks) {
|
setOutgoingWebhooks(teamId, outgoingWebhooks) {
|
||||||
this.outgoingWebhooks = outgoingWebhooks;
|
this.outgoingWebhooks.set(teamId, outgoingWebhooks);
|
||||||
this.receivedOutgoingWebhooks = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addOutgoingWebhook(outgoingWebhook) {
|
addOutgoingWebhook(outgoingWebhook) {
|
||||||
this.outgoingWebhooks.push(outgoingWebhook);
|
const teamId = outgoingWebhook.team_id;
|
||||||
|
const outgoingWebhooks = this.getOutgoingWebhooks(teamId);
|
||||||
|
|
||||||
|
outgoingWebhooks.push(outgoingWebhook);
|
||||||
|
|
||||||
|
this.setOutgoingWebhooks(teamId, outgoingWebhooks);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateOutgoingWebhook(outgoingWebhook) {
|
updateOutgoingWebhook(outgoingWebhook) {
|
||||||
for (let i = 0; i < this.outgoingWebhooks.length; i++) {
|
const teamId = outgoingWebhook.team_id;
|
||||||
if (this.outgoingWebhooks[i].id === outgoingWebhook.id) {
|
const outgoingWebhooks = this.getOutgoingWebhooks(teamId);
|
||||||
this.outgoingWebhooks[i] = outgoingWebhook;
|
|
||||||
|
for (let i = 0; i < outgoingWebhooks.length; i++) {
|
||||||
|
if (outgoingWebhooks[i].id === outgoingWebhook.id) {
|
||||||
|
outgoingWebhooks[i] = outgoingWebhook;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.setOutgoingWebhooks(teamId, outgoingWebhooks);
|
||||||
}
|
}
|
||||||
|
|
||||||
removeOutgoingWebhook(id) {
|
removeOutgoingWebhook(teamId, id) {
|
||||||
for (let i = 0; i < this.outgoingWebhooks.length; i++) {
|
let outgoingWebhooks = this.getOutgoingWebhooks(teamId);
|
||||||
if (this.outgoingWebhooks[i].id === id) {
|
|
||||||
this.outgoingWebhooks.splice(i, 1);
|
outgoingWebhooks = outgoingWebhooks.filter((outgoingWebhook) => outgoingWebhook.id !== id);
|
||||||
break;
|
|
||||||
}
|
this.setOutgoingWebhooks(teamId, outgoingWebhooks);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hasReceivedCommands() {
|
hasReceivedCommands(teamId) {
|
||||||
return this.receivedCommands;
|
return this.commands.has(teamId);
|
||||||
}
|
}
|
||||||
|
|
||||||
getCommands() {
|
getCommands(teamId) {
|
||||||
return this.commands;
|
return this.commands.get(teamId) || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
setCommands(commands) {
|
setCommands(teamId, commands) {
|
||||||
this.commands = commands;
|
this.commands.set(teamId, commands);
|
||||||
this.receivedCommands = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addCommand(command) {
|
addCommand(command) {
|
||||||
this.commands.push(command);
|
const teamId = command.team_id;
|
||||||
|
const commands = this.getCommands(teamId);
|
||||||
|
|
||||||
|
commands.push(command);
|
||||||
|
|
||||||
|
this.setCommands(teamId, commands);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateCommand(command) {
|
updateCommand(command) {
|
||||||
for (let i = 0; i < this.commands.length; i++) {
|
const teamId = command.team_id;
|
||||||
if (this.commands[i].id === command.id) {
|
const commands = this.getCommands(teamId);
|
||||||
this.commands[i] = command;
|
|
||||||
|
for (let i = 0; i < commands.length; i++) {
|
||||||
|
if (commands[i].id === command.id) {
|
||||||
|
commands[i] = command;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
removeCommand(id) {
|
this.setCommands(teamId, commands);
|
||||||
for (let i = 0; i < this.commands.length; i++) {
|
|
||||||
if (this.commands[i].id === id) {
|
|
||||||
this.commands.splice(i, 1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
removeCommand(teamId, id) {
|
||||||
|
let commands = this.getCommands(teamId);
|
||||||
|
|
||||||
|
commands = commands.filter((command) => command.id !== id);
|
||||||
|
|
||||||
|
this.setCommands(teamId, commands);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleEventPayload(payload) {
|
handleEventPayload(payload) {
|
||||||
@@ -138,7 +154,7 @@ class IntegrationStore extends EventEmitter {
|
|||||||
|
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case ActionTypes.RECEIVED_INCOMING_WEBHOOKS:
|
case ActionTypes.RECEIVED_INCOMING_WEBHOOKS:
|
||||||
this.setIncomingWebhooks(action.incomingWebhooks);
|
this.setIncomingWebhooks(action.teamId, action.incomingWebhooks);
|
||||||
this.emitChange();
|
this.emitChange();
|
||||||
break;
|
break;
|
||||||
case ActionTypes.RECEIVED_INCOMING_WEBHOOK:
|
case ActionTypes.RECEIVED_INCOMING_WEBHOOK:
|
||||||
@@ -146,11 +162,11 @@ class IntegrationStore extends EventEmitter {
|
|||||||
this.emitChange();
|
this.emitChange();
|
||||||
break;
|
break;
|
||||||
case ActionTypes.REMOVED_INCOMING_WEBHOOK:
|
case ActionTypes.REMOVED_INCOMING_WEBHOOK:
|
||||||
this.removeIncomingWebhook(action.id);
|
this.removeIncomingWebhook(action.teamId, action.id);
|
||||||
this.emitChange();
|
this.emitChange();
|
||||||
break;
|
break;
|
||||||
case ActionTypes.RECEIVED_OUTGOING_WEBHOOKS:
|
case ActionTypes.RECEIVED_OUTGOING_WEBHOOKS:
|
||||||
this.setOutgoingWebhooks(action.outgoingWebhooks);
|
this.setOutgoingWebhooks(action.teamId, action.outgoingWebhooks);
|
||||||
this.emitChange();
|
this.emitChange();
|
||||||
break;
|
break;
|
||||||
case ActionTypes.RECEIVED_OUTGOING_WEBHOOK:
|
case ActionTypes.RECEIVED_OUTGOING_WEBHOOK:
|
||||||
@@ -162,11 +178,11 @@ class IntegrationStore extends EventEmitter {
|
|||||||
this.emitChange();
|
this.emitChange();
|
||||||
break;
|
break;
|
||||||
case ActionTypes.REMOVED_OUTGOING_WEBHOOK:
|
case ActionTypes.REMOVED_OUTGOING_WEBHOOK:
|
||||||
this.removeOutgoingWebhook(action.id);
|
this.removeOutgoingWebhook(action.teamId, action.id);
|
||||||
this.emitChange();
|
this.emitChange();
|
||||||
break;
|
break;
|
||||||
case ActionTypes.RECEIVED_COMMANDS:
|
case ActionTypes.RECEIVED_COMMANDS:
|
||||||
this.setCommands(action.commands);
|
this.setCommands(action.teamId, action.commands);
|
||||||
this.emitChange();
|
this.emitChange();
|
||||||
break;
|
break;
|
||||||
case ActionTypes.RECEIVED_COMMAND:
|
case ActionTypes.RECEIVED_COMMAND:
|
||||||
@@ -178,7 +194,7 @@ class IntegrationStore extends EventEmitter {
|
|||||||
this.emitChange();
|
this.emitChange();
|
||||||
break;
|
break;
|
||||||
case ActionTypes.REMOVED_COMMAND:
|
case ActionTypes.REMOVED_COMMAND:
|
||||||
this.removeCommand(action.id);
|
this.removeCommand(action.teamId, action.id);
|
||||||
this.emitChange();
|
this.emitChange();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1145,6 +1145,7 @@ export function listIncomingHooks() {
|
|||||||
|
|
||||||
AppDispatcher.handleServerAction({
|
AppDispatcher.handleServerAction({
|
||||||
type: ActionTypes.RECEIVED_INCOMING_WEBHOOKS,
|
type: ActionTypes.RECEIVED_INCOMING_WEBHOOKS,
|
||||||
|
teamId: Client.teamId,
|
||||||
incomingWebhooks: data
|
incomingWebhooks: data
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -1168,6 +1169,7 @@ export function listOutgoingHooks() {
|
|||||||
|
|
||||||
AppDispatcher.handleServerAction({
|
AppDispatcher.handleServerAction({
|
||||||
type: ActionTypes.RECEIVED_OUTGOING_WEBHOOKS,
|
type: ActionTypes.RECEIVED_OUTGOING_WEBHOOKS,
|
||||||
|
teamId: Client.teamId,
|
||||||
outgoingWebhooks: data
|
outgoingWebhooks: data
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -1230,6 +1232,7 @@ export function deleteIncomingHook(id) {
|
|||||||
() => {
|
() => {
|
||||||
AppDispatcher.handleServerAction({
|
AppDispatcher.handleServerAction({
|
||||||
type: ActionTypes.REMOVED_INCOMING_WEBHOOK,
|
type: ActionTypes.REMOVED_INCOMING_WEBHOOK,
|
||||||
|
teamId: Client.teamId,
|
||||||
id
|
id
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -1245,6 +1248,7 @@ export function deleteOutgoingHook(id) {
|
|||||||
() => {
|
() => {
|
||||||
AppDispatcher.handleServerAction({
|
AppDispatcher.handleServerAction({
|
||||||
type: ActionTypes.REMOVED_OUTGOING_WEBHOOK,
|
type: ActionTypes.REMOVED_OUTGOING_WEBHOOK,
|
||||||
|
teamId: Client.teamId,
|
||||||
id
|
id
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -1282,6 +1286,7 @@ export function listTeamCommands() {
|
|||||||
|
|
||||||
AppDispatcher.handleServerAction({
|
AppDispatcher.handleServerAction({
|
||||||
type: ActionTypes.RECEIVED_COMMANDS,
|
type: ActionTypes.RECEIVED_COMMANDS,
|
||||||
|
teamId: Client.teamId,
|
||||||
commands: data
|
commands: data
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -1321,6 +1326,7 @@ export function deleteCommand(id) {
|
|||||||
() => {
|
() => {
|
||||||
AppDispatcher.handleServerAction({
|
AppDispatcher.handleServerAction({
|
||||||
type: ActionTypes.REMOVED_COMMAND,
|
type: ActionTypes.REMOVED_COMMAND,
|
||||||
|
teamId: Client.teamId,
|
||||||
id
|
id
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user