|
@@ -195,12 +195,6 @@ export class SlackCtrl {
|
|
|
}
|
|
}
|
|
|
}));
|
|
}));
|
|
|
|
|
|
|
|
- // select GROWI
|
|
|
|
|
- if (allowedRelationsForSingleUse.length > 0) {
|
|
|
|
|
- body.growiUrisForSingleUse = allowedRelationsForSingleUse.map(v => v.growiUri);
|
|
|
|
|
- return this.selectGrowiService.process(growiCommand, authorizeResult, body);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
// check permission for broadcast use
|
|
// check permission for broadcast use
|
|
|
const relationsForBroadcastUse:Relation[] = [];
|
|
const relationsForBroadcastUse:Relation[] = [];
|
|
|
await Promise.all(relations.map(async(relation) => {
|
|
await Promise.all(relations.map(async(relation) => {
|
|
@@ -213,11 +207,6 @@ export class SlackCtrl {
|
|
|
}
|
|
}
|
|
|
}));
|
|
}));
|
|
|
|
|
|
|
|
- // forward to GROWI server
|
|
|
|
|
- if (relationsForBroadcastUse.length > 0) {
|
|
|
|
|
- return this.sendCommand(growiCommand, relationsForBroadcastUse, body);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
// when all of GROWI disallowed
|
|
// when all of GROWI disallowed
|
|
|
if (relations.length === disallowedGrowiUrls.size) {
|
|
if (relations.length === disallowedGrowiUrls.size) {
|
|
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -241,11 +230,22 @@ export class SlackCtrl {
|
|
|
`To use this command, modify settings from following pages: ${linkUrlList}`,
|
|
`To use this command, modify settings from following pages: ${linkUrlList}`,
|
|
|
),
|
|
),
|
|
|
markdownSectionBlock(
|
|
markdownSectionBlock(
|
|
|
- `Or, if your GROWI version is 4.3.0 or below, upgrade GROWI to use commands: ${growiDocsLink}`,
|
|
|
|
|
|
|
+ `Or, if your GROWI version is 4.3.0 or below, upgrade GROWI to use commands and permission settings: ${growiDocsLink}`,
|
|
|
),
|
|
),
|
|
|
],
|
|
],
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // select GROWI
|
|
|
|
|
+ if (allowedRelationsForSingleUse.length > 0) {
|
|
|
|
|
+ body.growiUrisForSingleUse = allowedRelationsForSingleUse.map(v => v.growiUri);
|
|
|
|
|
+ return this.selectGrowiService.process(growiCommand, authorizeResult, body);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // forward to GROWI server
|
|
|
|
|
+ if (relationsForBroadcastUse.length > 0) {
|
|
|
|
|
+ return this.sendCommand(growiCommand, relationsForBroadcastUse, body);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Post('/interactions')
|
|
@Post('/interactions')
|