Added group_call_rageshake_request_id for rageshake grouping

This commit is contained in:
Robert Long
2022-02-07 15:24:43 -08:00
parent 942630c2fc
commit 4168540017
3 changed files with 33 additions and 10 deletions

View File

@@ -4,6 +4,7 @@ import { Button } from "../button";
import { FieldRow, InputField, ErrorMessage } from "../input/Input";
import { useSubmitRageshake, useRageshakeRequest } from "../settings/rageshake";
import { Body } from "../typography/Typography";
import { randomString } from "matrix-js-sdk/src/randomstring";
export function FeedbackModal({ inCall, roomId, ...rest }) {
const { submitRageshake, sending, sent, error } = useSubmitRageshake();
@@ -15,10 +16,16 @@ export function FeedbackModal({ inCall, roomId, ...rest }) {
const data = new FormData(e.target);
const description = data.get("description");
const sendLogs = data.get("sendLogs");
submitRageshake({ description, sendLogs });
const rageshakeRequestId = randomString(16);
submitRageshake({
description,
sendLogs,
rageshakeRequestId,
});
if (inCall && sendLogs) {
sendRageshakeRequest(roomId);
sendRageshakeRequest(roomId, rageshakeRequestId);
}
},
[inCall, submitRageshake, roomId, sendRageshakeRequest]