-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to unwrap automatically :chsk/recv events #151
Comments
There isn't an option for doing that presently. I'm not speaking for Peter, but he generally prefers simple primitives that can be composed over specific solutions. In this case you have one piece of message handling code that unwraps a Sente message and that's all that's required. It doesn't seem too bad to me, and keeps the interface and implantation code on Sente's side clean. I may be misunderstanding you though? |
Hi Eduardo, Daniel's correct - no option for automatic unwrapping atm. (BTW thanks a lot for helping out recently @danielcompton, really appreciate it!) Re: maybe adding an option... have been on the fence about that for a while... As Daniel mentioned, motivation for the wrapping was originally to keep the top-level Thinking about it now, we could probably achieve the same result with a validator on the Have some time this morning; will fiddle with it a bit and get back to you. Cheers :-) |
Have added a client-side Let me know if that does the trick? Cheers :-) |
@danielcompton, thanks for the answer. The reason why I suggested this change is that the current behavior forces everyone to implement the same piece of code in order to get @ptaoussanis, seems nice, thanks for the work. |
That makes sense. In our case we need to have the recv events all going to one multi method so we can handle them uniformly by dispatching them to re-frame. |
@ebellani Yeah, as Daniel mentioned - it's not unusual to want a different handler for Okay to close this issue? |
I'm handling server>user pushes with something of this nature:
Is there an option for not having to do that?
The text was updated successfully, but these errors were encountered: