diff --git a/src/ConferenceCallManager.js b/src/ConferenceCallManager.js index ca54d9d6..4b028dde 100644 --- a/src/ConferenceCallManager.js +++ b/src/ConferenceCallManager.js @@ -188,7 +188,7 @@ export class ConferenceCallManager extends EventEmitter { if (type.startsWith("m.call.") || type.startsWith("me.robertlong.conf")) { const content = event.getContent(); - const details = {}; + const details = { content }; switch (type) { case "m.call.invite": diff --git a/src/DevTools.jsx b/src/DevTools.jsx index 49775bfe..39174096 100644 --- a/src/DevTools.jsx +++ b/src/DevTools.jsx @@ -4,6 +4,16 @@ import styles from "./DevTools.module.css"; const colorHash = new ColorHash({ lightness: 0.8 }); +function UserId({ userId, ...rest }) { + const shortUserId = userId.split(":")[0]; + const color = colorHash.hex(shortUserId); + return ( + + {shortUserId} + + ); +} + function CallId({ callId, ...rest }) { const shortId = callId.substr(callId.length - 16); const color = colorHash.hex(shortId); @@ -17,6 +27,7 @@ function CallId({ callId, ...rest }) { export function DevTools({ manager }) { const [debugState, setDebugState] = useState(manager.debugState); + const [selectedEvent, setSelectedEvent] = useState(); useEffect(() => { function onRoomDebug() { @@ -33,13 +44,24 @@ export function DevTools({ manager }) { return (
Event Type: {event.type}
+ {event.callId && ( +
+ Call Id:
+ New Call Id:
+
+ To:
+ Reason: {event.reason} +
+ )} + {event.content && ( + <> +Content:
+
+ {JSON.stringify(event.content, undefined, 2)}
+
+ >
+ )}
+
+