You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an existing issue that is already proposing this?
I have searched the existing issues
Is your feature request related to a problem? Please describe it
The current wsAdapter only supports handling messages in the format { "event": string, "data": any }.
Describe the solution you'd like
I’ve implemented a feature in another-nestjs-ws-adapter that allows preprocessing of messages before routing. This enables the wsAdapter to handle different message formats.
Add a setMessagePreprocessor method to the wsAdapter to customize how messages are preprocessed.
constwsAdapter=newWsAdapter(app);wsAdapter.setMessagePreprocessor((message: any)=>{const[event, ...data]=message;return{ event, data };});
What is the motivation / use case for changing the behavior?
I believe this would be a valuable addition to the official @nestjs/websockets package, making it more flexible for various use cases. Would it be possible to consider integrating this functionality?
The text was updated successfully, but these errors were encountered:
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
The current
wsAdapter
only supports handling messages in the format{ "event": string, "data": any }
.Describe the solution you'd like
I’ve implemented a feature in another-nestjs-ws-adapter that allows preprocessing of messages before routing. This enables the wsAdapter to handle different message formats.
Teachability, documentation, adoption, migration strategy
Add a
setMessagePreprocessor
method to thewsAdapter
to customize how messages are preprocessed.What is the motivation / use case for changing the behavior?
I believe this would be a valuable addition to the official @nestjs/websockets package, making it more flexible for various use cases. Would it be possible to consider integrating this functionality?
The text was updated successfully, but these errors were encountered: