import logging from flask_socketio import emit def send_user_message_to_room(text, room_id): logging.debug("Sending message from user to room " + room_id + " : " + text) emit('message_from_user', {'data': text, "uuid": room_id}, to=room_id) def send_jarvis_message_to_room(text, room_id): logging.debug("Sending message from jarvis to room " + room_id + " : " + text) emit('message_from_jarvis', {'data': text, "uuid": room_id}, to=room_id)