Add room_id and display_name to rageshakes

This commit is contained in:
Robert Long 2022-02-23 15:52:53 -08:00
parent 641b82dc45
commit 3b017eb92b
5 changed files with 14 additions and 3 deletions

View file

@ -22,6 +22,7 @@ export function FeedbackModal({ inCall, roomId, ...rest }) {
description, description,
sendLogs, sendLogs,
rageshakeRequestId, rageshakeRequestId,
roomId,
}); });
if (inCall && sendLogs) { if (inCall && sendLogs) {

View file

@ -193,7 +193,10 @@ export function InCallView({
show={showInspector} show={showInspector}
/> />
{rageshakeRequestModalState.isOpen && ( {rageshakeRequestModalState.isOpen && (
<RageshakeRequestModal {...rageshakeRequestModalProps} /> <RageshakeRequestModal
{...rageshakeRequestModalProps}
roomId={roomId}
/>
)} )}
</div> </div>
); );

View file

@ -17,7 +17,6 @@ export function OverflowMenu({
roomId, roomId,
setShowInspector, setShowInspector,
showInspector, showInspector,
client,
inCall, inCall,
groupCall, groupCall,
}) { }) {

View file

@ -5,7 +5,7 @@ import { FieldRow, ErrorMessage } from "../input/Input";
import { useSubmitRageshake } from "../settings/rageshake"; import { useSubmitRageshake } from "../settings/rageshake";
import { Body } from "../typography/Typography"; import { Body } from "../typography/Typography";
export function RageshakeRequestModal({ rageshakeRequestId, ...rest }) { export function RageshakeRequestModal({ rageshakeRequestId, roomId, ...rest }) {
const { submitRageshake, sending, sent, error } = useSubmitRageshake(); const { submitRageshake, sending, sent, error } = useSubmitRageshake();
useEffect(() => { useEffect(() => {
@ -27,6 +27,7 @@ export function RageshakeRequestModal({ rageshakeRequestId, ...rest }) {
submitRageshake({ submitRageshake({
sendLogs: true, sendLogs: true,
rageshakeRequestId, rageshakeRequestId,
roomId,
}) })
} }
disabled={sending} disabled={sending}

View file

@ -47,9 +47,16 @@ export function useSubmitRageshake() {
body.append("touch_input", touchInput); body.append("touch_input", touchInput);
if (client) { if (client) {
const userId = client.getUserId();
const user = client.getUser(userId);
body.append("display_name", user?.displayName);
body.append("user_id", client.credentials.userId); body.append("user_id", client.credentials.userId);
body.append("device_id", client.deviceId); body.append("device_id", client.deviceId);
if (opts.roomId) {
body.append("room_id", opts.roomId);
}
if (client.isCryptoEnabled()) { if (client.isCryptoEnabled()) {
const keys = [`ed25519:${client.getDeviceEd25519Key()}`]; const keys = [`ed25519:${client.getDeviceEd25519Key()}`];
if (client.getDeviceCurve25519Key) { if (client.getDeviceCurve25519Key) {