My personal webspace

A webspace for innovation, free thinking, and procrastination

Just a quick note which frustrated me quite a bit on Thursday; intercepting messages (which should call handle_out) in Phoenix Framework’s channels does not cause the handler to get called if you are using “send” instead of broadcast.

I suppose this actually makes sense, since you wouldn’t want to stuck in an infinite loop (filtering a send, which sends something), but it wasn’t obvious why Phoenix was ignoring my handle_out function. Almost like it wasn’t detecting the itnercept() parameters.

A solution may be to add documentation about handle_out to the callbacks section of the Channels module API, specifically informing the user that they can’t do that.


Content © 2022 Charles Hathaway