Update control if guide is in a room

This commit is contained in:
oobjectt 2022-12-10 22:50:18 +01:00
parent 9a4a83d5ed
commit 48d3461736

View File

@ -199,6 +199,8 @@ export const GuideToolView: FC<{}> = props =>
{ {
const parser = event.getParser(); const parser = event.getParser();
if (parser.roomId !== 0)
{
const messageGroups = [ ...ongoingMessageGroups ]; const messageGroups = [ ...ongoingMessageGroups ];
let lastGroup = messageGroups[messageGroups.length - 1]; let lastGroup = messageGroups[messageGroups.length - 1];
@ -213,6 +215,7 @@ export const GuideToolView: FC<{}> = props =>
lastGroup.addChat(new GuideToolMessage(parser.roomName, parser.roomId)); lastGroup.addChat(new GuideToolMessage(parser.roomName, parser.roomId));
setOngoingMessageGroups(messageGroups); setOngoingMessageGroups(messageGroups);
}
}); });
useMessageEvent<GuideSessionEndedMessageEvent>(GuideSessionEndedMessageEvent, event => useMessageEvent<GuideSessionEndedMessageEvent>(GuideSessionEndedMessageEvent, event =>