feat(slack): add draft preview cleanup lifecycle
This commit is contained in:
@@ -135,7 +135,8 @@ export async function dispatchPreparedSlackMessage(prepared: PreparedSlackMessag
|
||||
);
|
||||
}
|
||||
} else if (mediaCount > 0) {
|
||||
draftStream?.stop();
|
||||
await draftStream?.clear();
|
||||
hasStreamedMessage = false;
|
||||
}
|
||||
|
||||
const replyThreadTs = replyPlan.nextThreadTs();
|
||||
@@ -215,6 +216,7 @@ export async function dispatchPreparedSlackMessage(prepared: PreparedSlackMessag
|
||||
const anyReplyDelivered = queuedFinal || (counts.block ?? 0) > 0 || (counts.final ?? 0) > 0;
|
||||
|
||||
if (!anyReplyDelivered) {
|
||||
await draftStream.clear();
|
||||
if (prepared.isRoomish) {
|
||||
clearHistoryEntriesIfEnabled({
|
||||
historyMap: ctx.channelHistories,
|
||||
|
||||
Reference in New Issue
Block a user