Fix re-enter jitsi call

This commit is contained in:
jim3692 2023-03-22 19:53:19 +02:00
parent 2d25d0f916
commit b34de2c79d

View file

@ -31,18 +31,19 @@ function JitsiRoom(props) {
const roomTimeline = new RoomTimeline(rId);
const topic = roomTimeline.room.currentState.getStateEvents('m.room.topic')[0]?.getContent().topic
if (mx.getRoom(rId) && topic === TOPIC_JITSI_CALL && confirm('Do you want to join this call?')) {
if (mx.getRoom(rId) && topic === TOPIC_JITSI_CALL) {
if (confirm('Do you want to join this call?')) {
setRoomInfo({
roomTimeline,
eventId: eId ?? null,
});
} else {
// TODO: add ability to join room if roomId is invalid
} else if (!jitsiCallId) {
setRoomInfo({
roomTimeline: null,
eventId: null,
});
}
}
};
navigation.on(cons.events.navigation.ROOM_SELECTED, handleRoomSelected);
@ -80,6 +81,10 @@ function JitsiRoom(props) {
onClick={() => {
setJitsiCallId(null);
setRoomName('');
setRoomInfo({
roomTimeline: null,
eventId: null,
});
}}
>
X