|
|
@@ -182,14 +182,16 @@ export class SlackCtrl {
|
|
|
await Promise.all(relations.map(async(relation) => {
|
|
|
const isSupported = await this.relationsService.isSupportedGrowiCommandForBroadcastUse(relation, growiCommand.growiCommandType, baseDate);
|
|
|
if (isSupported) {
|
|
|
- relationsForSingleUse.push(relation);
|
|
|
+ relationsForBroadcastUse.push(relation);
|
|
|
}
|
|
|
}));
|
|
|
|
|
|
/*
|
|
|
* forward to GROWI server
|
|
|
*/
|
|
|
- this.sendCommand(growiCommand, relationsForBroadcastUse, body);
|
|
|
+ if (relationsForBroadcastUse.length > 0) {
|
|
|
+ this.sendCommand(growiCommand, relationsForBroadcastUse, body);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Post('/interactions')
|