mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-15 08:50:48 +08:00
fix: support Harness interactions across IM channels
This commit is contained in:
parent
3e7e1dcdd7
commit
cd8175d341
30 changed files with 5433 additions and 555 deletions
|
|
@ -309,6 +309,7 @@ export class SlackRuntime {
|
|||
status: this.#status,
|
||||
logger: this.#logger,
|
||||
replyTimeoutMs: this.#replyTimeoutMs,
|
||||
signal: controller.signal,
|
||||
});
|
||||
let timer;
|
||||
try {
|
||||
|
|
@ -389,7 +390,16 @@ export class SlackRuntime {
|
|||
if (this.#appId && packet.payload.api_app_id
|
||||
&& packet.payload.api_app_id !== this.#appId) return;
|
||||
const message = normalizeSlackEvent(packet.payload, this.#config.platformId.split(':')[1]);
|
||||
if (message) void this.#bridge?.accept(message);
|
||||
const bridge = this.#bridge;
|
||||
if (message && bridge) {
|
||||
void bridge.accept(message).catch((error) => {
|
||||
if (generation !== this.#generation || this.#stopped) return;
|
||||
this.#logger.error?.(
|
||||
`[dsh-im:slack] bot ${this.#config.botId} message handling failed:`,
|
||||
error,
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
addSocketListener(socket, 'close', (event = {}) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue