We need a way to be able to specify which chatroom to connect to for our polls-specific chat. To do that we'll need to start specifying the chatroom (we'll use that as part of the topic to connect to). We'll start by placing a data attribute on our chat-window in lib/vocial_web/templates/shared/_chat.html.eex that we will reference later in our chat.js file:
<div class="chat-window container well" id="enable-chat-channel" data-chatroom="<%= @chatroom %>">
We'll need to actually pass a value to that that will enable us to reference @chatroom since right now we're not setting that anywhere. We'll also need to hop out to our lib/vocial_web/templates/poll/show.html.eex and set that as part of the call to render:
<%= ...