We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
i want to use io.emit in my code
in using..
ChattingRouter.on("sendMessage", async (sock, args) => { const eventName = args.shift(); const { name, chat, room_id, user_id } = args.shift(); console.log(sock); const message = await model.Message.create({ content: chat, user_id, room_id, }); sock.emit(`receiveMessage${room_id}`, { id: message.id, name, chat, user_id, }); });
but i want to code write below
ChattingRouter.on("sendMessage", async (sock, args) => { const eventName = args.shift(); const { name, chat, room_id, user_id } = args.shift(); console.log(sock); const message = await model.Message.create({ content: chat, user_id, room_id, }); io.emit(`receiveMessage${room_id}`, { id: message.id, name, chat, user_id, }); });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
i want to use io.emit in my code
in using..
but i want to code write below
The text was updated successfully, but these errors were encountered: