2023-03-25 12:25:47 +01:00
|
|
|
import logging
|
|
|
|
|
2023-03-25 15:52:22 +01:00
|
|
|
from flask_socketio import emit
|
2023-03-25 12:25:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
def send_user_message_to_room(text, room_id):
|
|
|
|
logging.debug("Sending message from user to room " + room_id + " : " + text)
|
2023-03-25 15:52:22 +01:00
|
|
|
emit('message_from_user', {'data': text, "uuid": room_id}, to=room_id)
|
2023-03-25 12:25:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
def send_jarvis_message_to_room(text, room_id):
|
|
|
|
logging.debug("Sending message from jarvis to room " + room_id + " : " + text)
|
2023-03-25 15:52:22 +01:00
|
|
|
emit('message_from_jarvis', {'data': text, "uuid": room_id}, to=room_id)
|