Page MenuHomePhorge

D14377.1768583566.diff
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

D14377.1768583566.diff

diff --git a/lib/components/debug-logs-context-provider.react.js b/lib/components/debug-logs-context-provider.react.js
--- a/lib/components/debug-logs-context-provider.react.js
+++ b/lib/components/debug-logs-context-provider.react.js
@@ -16,9 +16,12 @@
const addLog = React.useCallback(
(title: string, message: string) => {
+ console.log(`${title}: ${message}`);
+
if (!isCurrentUserStaff && !isDev) {
return;
}
+
setLogs(prevLogs => [
...prevLogs,
{
diff --git a/lib/tunnelbroker/use-peer-to-peer-message-handler.js b/lib/tunnelbroker/use-peer-to-peer-message-handler.js
--- a/lib/tunnelbroker/use-peer-to-peer-message-handler.js
+++ b/lib/tunnelbroker/use-peer-to-peer-message-handler.js
@@ -217,11 +217,6 @@
}
if (!deviceKeys) {
- console.log(
- 'Error creating inbound session with device ' +
- `${senderDeviceID}: No keys for the device, ` +
- `session version: ${sessionVersion}`,
- );
addLog(
'Error creating inbound session with device',
`${senderDeviceID}: No keys for the device, ` +
@@ -274,11 +269,6 @@
await resendPeerToPeerMessages(senderDeviceID);
}
} else {
- console.log(
- 'Error creating inbound session with device ' +
- `${senderDeviceID}: ${errorMessage}, ` +
- `session version: ${sessionVersion}`,
- );
addLog(
'Error creating inbound session with device ',
`${senderDeviceID}: ${errorMessage}, ` +
@@ -333,10 +323,6 @@
}
}
- console.log(
- 'Error decrypting message from device ' +
- `${message.senderInfo.deviceID}: ${errorMessage}`,
- );
addLog(
'Error decrypting message from device',
`${message.senderInfo.deviceID}: ${errorMessage}`,
diff --git a/native/account/qr-auth/primary-device-qr-auth-context-provider.js b/native/account/qr-auth/primary-device-qr-auth-context-provider.js
--- a/native/account/qr-auth/primary-device-qr-auth-context-provider.js
+++ b/native/account/qr-auth/primary-device-qr-auth-context-provider.js
@@ -181,13 +181,11 @@
});
await sendDeviceListUpdateSuccessMessage();
} catch (err) {
- const errorTitle =
+ addLog(
`Error while replacing device ${keyserverDeviceID ?? ''}` +
- ` with ${targetDeviceID}: `;
- const errorMessage = getMessageForException(err) ?? 'unknown error';
-
- console.log(errorTitle, errorMessage);
- addLog(errorTitle, errorMessage);
+ ` with ${targetDeviceID}: `,
+ getMessageForException(err) ?? 'unknown error',
+ );
Alert.alert(
'Adding device failed',
@@ -231,11 +229,10 @@
setConnectingInProgress(false);
const targetDeviceID = secondaryDeviceID.current;
- const errorTitle = `Error adding device ${targetDeviceID ?? ''}: `;
- const errorMessage = getMessageForException(err) ?? 'unknown error';
-
- console.log(errorTitle, errorMessage);
- addLog(errorTitle, errorMessage);
+ addLog(
+ `Error adding device ${targetDeviceID ?? ''}`,
+ getMessageForException(err) ?? 'unknown error',
+ );
Alert.alert('Adding device failed', 'Failed to update the device list', [
{ text: 'OK' },

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 16, 5:12 PM (16 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5945389
Default Alt Text
D14377.1768583566.diff (3 KB)

Event Timeline