jarvis-server-v2/jarvis/utils/chat_utils.py
2023-03-25 15:52:22 +01:00

14 lines
462 B
Python

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)