Great, and we can also test that our messages are pushed out only to people in that specific chat room.
March 18,pm 1 I already created an Elixir Phoenix app for learning purpose. Now that we have adult chat 12 working, we need to create create a way for users to post messages to the room.
If we refresh the - our messages are lost. Now we can use channel. We only see the messages for that specific room are displayed.
We see that our lo and the name of our chat room anonymous sexting partner being displayed. But what we have here will work for our application. Since the topic is stored as a field on our socket, we can pattern match on it to get the room.
If we go to our chat again and then inspect the browser console, we see our message is logged letting us know we ed cuat channel successfully. Once we have those we can send them to the server with channel.
In this app students of our collage will create profiles, and will chat with each other about study and general sex talk website. Now we can use the room to initiate a new channel for our topic, using the room we got from the path. I want to create a group chat room as well as a private chat system. Our last piece will be to update our template to load any existing messages for the room.
CreateMessages do use Ecto. This will be a little different from the chat room application we built in episode 38 - where we had a married chat room. ChatView do use TeacherWeb, :view end With that we can create the template for our chat room.