mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-22 03:03:42 +00:00
mom: fix [SILENT] to delete thread messages too
Track all thread message timestamps during a run. When response is [SILENT], delete all thread messages before deleting the main message. This prevents the 'This message was deleted' tombstone in Slack.
This commit is contained in:
parent
8ba6aa6627
commit
f1451fd8f0
3 changed files with 18 additions and 5 deletions
|
|
@ -197,8 +197,9 @@ export class SlackBot {
|
|||
await this.webClient.chat.delete({ channel, ts });
|
||||
}
|
||||
|
||||
async postInThread(channel: string, threadTs: string, text: string): Promise<void> {
|
||||
await this.webClient.chat.postMessage({ channel, thread_ts: threadTs, text });
|
||||
async postInThread(channel: string, threadTs: string, text: string): Promise<string> {
|
||||
const result = await this.webClient.chat.postMessage({ channel, thread_ts: threadTs, text });
|
||||
return result.ts as string;
|
||||
}
|
||||
|
||||
async uploadFile(channel: string, filePath: string, title?: string): Promise<void> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue