botinabox 2.9.0 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -126,6 +126,10 @@ ${block.text}`);
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
// src/channels/slack/bolt-adapter.ts
|
|
129
|
+
var SLACK_TS_RE = /^\d+\.\d+$/;
|
|
130
|
+
function isValidSlackThreadTs(value) {
|
|
131
|
+
return typeof value === "string" && SLACK_TS_RE.test(value);
|
|
132
|
+
}
|
|
129
133
|
var SlackBoltAdapter = class {
|
|
130
134
|
app = null;
|
|
131
135
|
config;
|
|
@@ -176,7 +180,7 @@ var SlackBoltAdapter = class {
|
|
|
176
180
|
token: botToken,
|
|
177
181
|
channel: channelId,
|
|
178
182
|
text: chunk,
|
|
179
|
-
...threadId ? { thread_ts: threadId } : {}
|
|
183
|
+
...isValidSlackThreadTs(threadId) ? { thread_ts: threadId } : {}
|
|
180
184
|
});
|
|
181
185
|
}
|
|
182
186
|
}, { priority: 90 });
|
|
@@ -197,7 +201,7 @@ var SlackBoltAdapter = class {
|
|
|
197
201
|
file: createReadStream(filePath),
|
|
198
202
|
filename: basename(filePath),
|
|
199
203
|
title: fileName ?? basename(filePath),
|
|
200
|
-
...threadId ? { thread_ts: threadId } : {}
|
|
204
|
+
...isValidSlackThreadTs(threadId) ? { thread_ts: threadId } : {}
|
|
201
205
|
});
|
|
202
206
|
}
|
|
203
207
|
} catch {
|