Skip to content

Commit d5b26a0

Browse files
committed
Allow hooks to run on messages
1 parent 1f39a24 commit d5b26a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/middlewares/hooks/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,9 @@ export class HooksManager {
423423
private shouldSkipHook(span: HookSpan, hook: HookObject): boolean {
424424
const context = span.getContext();
425425
return (
426-
!['chatComplete', 'complete', 'embed'].includes(context.requestType) ||
426+
!['chatComplete', 'complete', 'embed', 'messages'].includes(
427+
context.requestType
428+
) ||
427429
(context.requestType === 'embed' &&
428430
hook.eventType !== 'beforeRequestHook') ||
429431
(context.requestType === 'embed' && hook.type === HookType.MUTATOR) ||

0 commit comments

Comments
 (0)