Taichi Masuyama 4 лет назад
Родитель
Сommit
8fe27fac30

+ 1 - 0
packages/app/src/server/models/index.js

@@ -18,4 +18,5 @@ module.exports = {
   GlobalNotificationSlackSetting: require('./GlobalNotificationSetting/GlobalNotificationSlackSetting'),
   ShareLink: require('./share-link'),
   SlackAppIntegration: require('./slack-app-integration'),
+  SlackAppIntegrationMock: require('./slack-app-integration-mock'),
 };

+ 4 - 2
packages/app/src/server/models/slack-app-integration-mock.js

@@ -1,7 +1,7 @@
 const crypto = require('crypto');
 const mongoose = require('mongoose');
 
-const permittedChannelsSchema = new mongoose.Schema({
+const permittedChannelsForEachCommandSchema = new mongoose.Schema({
   channelsObject: {},
 });
 
@@ -9,7 +9,9 @@ const permittedChannelsSchema = new mongoose.Schema({
 const schema = new mongoose.Schema({
   tokenGtoP: { type: String, required: true, unique: true },
   tokenPtoG: { type: String, required: true, unique: true },
-  permittedChannels: permittedChannelsSchema,
+  supportedCommandsForBroadcastUse: { type: [String], default: [] },
+  supportedCommandsForSingleUse: { type: [String], default: [] },
+  permittedChannelsForEachCommand: permittedChannelsForEachCommandSchema,
 });
 
 class SlackAppIntegrationMock {

+ 1 - 1
packages/slackbot-proxy/src/entities/relation-mock.ts

@@ -11,7 +11,7 @@ import { Installation } from './installation';
 //     search: ['admin'],
 //   }
 interface PermittedChannelsForEachCommand {
-  commandToChannelMap: { [command: string]: string[] };
+  [command: string]: string[] ;
 }
 
 @Entity()