do broadcast! socket, “new_msg”, %{uid: uid, body: body} {:noreply, socket} end def handle_in(“create:post”, attrs, socket) do changes = Post.changeset(%Post{}, attrs) if changeset.valid? do Repo.insert!(changeset) {:reply, :ok, socket} else {:reply, :error, socket} end end