|
|
@@ -420,14 +420,19 @@ module.exports = (crowi) => {
|
|
|
* this code represents the creation of new SlackAppIntegration model
|
|
|
*/
|
|
|
const SlackAppIntegrationMock = mongoose.model('SlackAppIntegrationMock');
|
|
|
+ const initialSupportedCommandsForBroadcastUse = new Map();
|
|
|
+ const initialSupportedCommandsForSingleUse = new Map();
|
|
|
+ defaultSupportedCommandsNameForBroadcastUse.forEach((commandName) => {
|
|
|
+ initialSupportedCommandsForBroadcastUse.set(commandName, true);
|
|
|
+ });
|
|
|
+ defaultSupportedCommandsNameForSingleUse.forEach((commandName) => {
|
|
|
+ initialSupportedCommandsForSingleUse.set(commandName, true);
|
|
|
+ });
|
|
|
const MOCK = await SlackAppIntegrationMock.create({
|
|
|
tokenGtoP,
|
|
|
tokenPtoG,
|
|
|
- supportedCommandsForBroadcastUse: defaultSupportedCommandsNameForBroadcastUse,
|
|
|
- supportedCommandsForSingleUse: defaultSupportedCommandsNameForSingleUse,
|
|
|
- permittedChannelsForEachCommand: {
|
|
|
- channelsObject: new Map(),
|
|
|
- },
|
|
|
+ permissionsForBroadcastUseCommands: initialSupportedCommandsForBroadcastUse,
|
|
|
+ permissionsForSingleUseCommands: initialSupportedCommandsForSingleUse,
|
|
|
});
|
|
|
// MOCK DATA DELETE THIS GW-6972 ---------------
|
|
|
return res.apiv3(slackAppTokens, 200);
|