Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b6193ab62 | ||
|
|
10a2733fd5 | ||
|
|
e7353e184f | ||
|
|
a479863f88 | ||
|
|
c550545116 |
@@ -38,7 +38,7 @@
|
||||
"classnames": "^2.3.1",
|
||||
"color-hash": "^2.0.1",
|
||||
"events": "^3.3.0",
|
||||
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#45e56f8cc36c459ed43e405be4206e5e66b3ad98",
|
||||
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#965f4fb13b4b36b26a3f4d7214cc7630d9f579a5",
|
||||
"matrix-widget-api": "^1.0.0",
|
||||
"mermaid": "^8.13.8",
|
||||
"normalize.css": "^8.0.1",
|
||||
|
||||
@@ -43,9 +43,7 @@ export function FeedbackModal({ inCall, roomId, onClose, ...rest }: Props) {
|
||||
const descriptionData = data.get("description");
|
||||
const description =
|
||||
typeof descriptionData === "string" ? descriptionData : "";
|
||||
const sendLogsData = data.get("sendLogs");
|
||||
const sendLogs =
|
||||
typeof sendLogsData === "string" ? sendLogsData === "true" : false;
|
||||
const sendLogs = Boolean(data.get("sendLogs"));
|
||||
const rageshakeRequestId = randomString(16);
|
||||
|
||||
submitRageshake({
|
||||
|
||||
@@ -121,8 +121,11 @@ export function InspectorContextProvider({
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
// The context will be initialized empty.
|
||||
// It is then set from within GroupCallInspector.
|
||||
// We take the tuple of [currentState, setter] and stick
|
||||
// it straight into the context for other things to call
|
||||
// the setState method... this feels like a fairly severe
|
||||
// contortion of the hooks API - is this really the best way
|
||||
// to do this?
|
||||
const context = useState<InspectorContextState>({});
|
||||
return (
|
||||
<InspectorContext.Provider value={context}>
|
||||
|
||||
@@ -40,7 +40,9 @@ export function useSubmitRageshake(): {
|
||||
error: Error;
|
||||
} {
|
||||
const client: MatrixClient = useClient().client;
|
||||
const json = useContext(InspectorContext);
|
||||
// The value of the context is the whole tuple returned from setState,
|
||||
// so we just want the current state.
|
||||
const [inspectorState] = useContext(InspectorContext);
|
||||
|
||||
const [{ sending, sent, error }, setState] = useState({
|
||||
sending: false,
|
||||
@@ -231,10 +233,12 @@ export function useSubmitRageshake(): {
|
||||
body.append("compressed-log", new Blob([buf]), entry.id);
|
||||
}
|
||||
|
||||
if (json) {
|
||||
if (inspectorState) {
|
||||
body.append(
|
||||
"file",
|
||||
new Blob([JSON.stringify(json)], { type: "text/plain" }),
|
||||
new Blob([JSON.stringify(inspectorState)], {
|
||||
type: "text/plain",
|
||||
}),
|
||||
"groupcall.txt"
|
||||
);
|
||||
}
|
||||
@@ -262,7 +266,7 @@ export function useSubmitRageshake(): {
|
||||
console.error(error);
|
||||
}
|
||||
},
|
||||
[client, json, sending]
|
||||
[client, inspectorState, sending]
|
||||
);
|
||||
|
||||
return {
|
||||
|
||||
@@ -8390,9 +8390,9 @@ matrix-events-sdk@^0.0.1-beta.7:
|
||||
resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1-beta.7.tgz#5ffe45eba1f67cc8d7c2377736c728b322524934"
|
||||
integrity sha512-9jl4wtWanUFSy2sr2lCjErN/oC8KTAtaeaozJtrgot1JiQcEI4Rda9OLgQ7nLKaqb4Z/QUx/fR3XpDzm5Jy1JA==
|
||||
|
||||
"matrix-js-sdk@github:matrix-org/matrix-js-sdk#3334c01191bcd82b5243916284c9a08d08fd9795":
|
||||
version "19.2.0"
|
||||
resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/3334c01191bcd82b5243916284c9a08d08fd9795"
|
||||
"matrix-js-sdk@github:matrix-org/matrix-js-sdk#965f4fb13b4b36b26a3f4d7214cc7630d9f579a5":
|
||||
version "19.3.0"
|
||||
resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/965f4fb13b4b36b26a3f4d7214cc7630d9f579a5"
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.12.5"
|
||||
"@types/sdp-transform" "^2.4.5"
|
||||
|
||||
Reference in New Issue
Block a user