mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
actually allow bots through sockets oopsie ;3
This commit is contained in:
@@ -10,7 +10,7 @@ const { broadcastMessage, broadcastTyping } = require('./broadcast');
|
|||||||
const { playTypingNote, normalizeTtsOptions, maybeSendAccessNotice, maybeSpeak, TYPING_SEND_NOTE } = require('./notifications');
|
const { playTypingNote, normalizeTtsOptions, maybeSendAccessNotice, maybeSpeak, TYPING_SEND_NOTE } = require('./notifications');
|
||||||
|
|
||||||
function createHandlers({ sendSystemMessage }) {
|
function createHandlers({ sendSystemMessage }) {
|
||||||
function handleIncoming({ text, tts } = {}, socket, cb = () => {}) {
|
function handleIncoming({ text, tts, bot = false, profileImage = null } = {}, socket, cb = () => {}) {
|
||||||
const role = getRole(socket);
|
const role = getRole(socket);
|
||||||
void role;
|
void role;
|
||||||
const normalized = normalizeUserText(text);
|
const normalized = normalizeUserText(text);
|
||||||
@@ -27,6 +27,8 @@ function createHandlers({ sendSystemMessage }) {
|
|||||||
roverId,
|
roverId,
|
||||||
roverCtx: buildRoverCtxSnapshot(roverId),
|
roverCtx: buildRoverCtxSnapshot(roverId),
|
||||||
tts: ttsOptions,
|
tts: ttsOptions,
|
||||||
|
bot,
|
||||||
|
profileImage,
|
||||||
});
|
});
|
||||||
|
|
||||||
logger.info('Chat message', { socket: socket.id, roverId: message.roverId });
|
logger.info('Chat message', { socket: socket.id, roverId: message.roverId });
|
||||||
|
|||||||
Reference in New Issue
Block a user