Fix re-enter jitsi call
This commit is contained in:
parent
2d25d0f916
commit
b34de2c79d
1 changed files with 16 additions and 11 deletions
|
@ -31,17 +31,18 @@ function JitsiRoom(props) {
|
||||||
const roomTimeline = new RoomTimeline(rId);
|
const roomTimeline = new RoomTimeline(rId);
|
||||||
const topic = roomTimeline.room.currentState.getStateEvents('m.room.topic')[0]?.getContent().topic
|
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) {
|
||||||
setRoomInfo({
|
if (confirm('Do you want to join this call?')) {
|
||||||
roomTimeline,
|
setRoomInfo({
|
||||||
eventId: eId ?? null,
|
roomTimeline,
|
||||||
});
|
eventId: eId ?? null,
|
||||||
} else {
|
});
|
||||||
// TODO: add ability to join room if roomId is invalid
|
} else if (!jitsiCallId) {
|
||||||
setRoomInfo({
|
setRoomInfo({
|
||||||
roomTimeline: null,
|
roomTimeline: null,
|
||||||
eventId: null,
|
eventId: null,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -80,6 +81,10 @@ function JitsiRoom(props) {
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setJitsiCallId(null);
|
setJitsiCallId(null);
|
||||||
setRoomName('');
|
setRoomName('');
|
||||||
|
setRoomInfo({
|
||||||
|
roomTimeline: null,
|
||||||
|
eventId: null,
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
X
|
X
|
||||||
|
|
Loading…
Reference in a new issue