|
@@ -49,6 +49,7 @@ class BoltReciever {
|
|
|
|
|
|
|
|
const { App } = require('@slack/bolt');
|
|
const { App } = require('@slack/bolt');
|
|
|
const { WebClient, LogLevel } = require('@slack/web-api');
|
|
const { WebClient, LogLevel } = require('@slack/web-api');
|
|
|
|
|
+const S2sMessage = require('../models/vo/s2s-message');
|
|
|
|
|
|
|
|
class BoltService {
|
|
class BoltService {
|
|
|
|
|
|
|
@@ -86,6 +87,22 @@ class BoltService {
|
|
|
this.isBoltSetup = true;
|
|
this.isBoltSetup = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ async publishUpdatedMessage() {
|
|
|
|
|
+ const { s2sMessagingService } = this;
|
|
|
|
|
+
|
|
|
|
|
+ if (s2sMessagingService != null) {
|
|
|
|
|
+ const s2sMessage = new S2sMessage('boltServiceUpdated', { updatedAt: new Date() });
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ await s2sMessagingService.publish(s2sMessage);
|
|
|
|
|
+ }
|
|
|
|
|
+ catch (e) {
|
|
|
|
|
+ logger.error('Failed to publish update message with S2sMessagingService: ', e.message);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
setupRoute() {
|
|
setupRoute() {
|
|
|
this.bolt.command('/growi', async({
|
|
this.bolt.command('/growi', async({
|
|
|
command, client, body, ack,
|
|
command, client, body, ack,
|