refactor(onebot): declare every action param the handler reads
Action handlers now only see fields from the param table. Extra client keys are still ignored. Garbage values on declared numbers fail instead of becoming zero.
This commit is contained in:
14 files changed
+952
-235
No files matched your search
@@ -149,7 +149,7 @@ describe('ApiHandler TRACE lifecycle', () => {
|
||||
const stream = defineStreamAction({
|
||||
name: 'trace_stream',
|
||||
params: {},
|
||||
run: async (_params, _ctx, _raw, sink) => {
|
||||
run: async (_params, _ctx, sink) => {
|
||||
await sink.send({ type: StreamStatus.Stream, chunk: 'complete-frame' });
|
||||
return {
|
||||
status: 'ok',
|
||||
|
||||
Reference in new issue
Block a user