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:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user