Stop bot streamed drafts from the compose send button

Task: 2026/08/06/stop-bot-streamed-drafts
This commit is contained in:
John Preston
2026-08-07 14:02:18 +04:00
parent e5f91db9a0
commit cdbdc89663
12 changed files with 265 additions and 13 deletions

View File

@@ -1120,6 +1120,12 @@ void Updates::handleSendActionUpdate(
const auto &data = action.c_sendMessageRichMessageDraftAction();
history->streamedDrafts().apply(rootId, fromId, when, data);
return;
} else if (action.type() == mtpc_sendMessageStopDraftAction) {
const auto &data = action.c_sendMessageStopDraftAction();
if (const auto streamed = history->streamedDraftsIfExists()) {
streamed->applyStop(data.vrandom_id().v);
}
return;
}
session().data().sendActionManager().registerFor(
history,