handle grantSignature undefined

pull/1229/head
Audric Ackermann 5 years ago
parent d8df91fa15
commit 880e039652
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -456,7 +456,7 @@ export class LeftPaneMessageSection extends React.Component<Props, State> {
if (!OpenGroup.validate(serverUrl)) { if (!OpenGroup.validate(serverUrl)) {
window.pushToast({ window.pushToast({
title: window.i18n('noServerURL'), title: window.i18n('noServerURL'),
id: 'connectToServerFail', id: 'connectToServer',
type: 'error', type: 'error',
}); });
@ -480,7 +480,7 @@ export class LeftPaneMessageSection extends React.Component<Props, State> {
if (await OpenGroup.serverExists(serverUrl)) { if (await OpenGroup.serverExists(serverUrl)) {
window.pushToast({ window.pushToast({
title: window.i18n('connectingToServer'), title: window.i18n('connectingToServer'),
id: 'connectToServerSuccess', id: 'connectToServer',
type: 'success', type: 'success',
}); });
@ -488,9 +488,10 @@ export class LeftPaneMessageSection extends React.Component<Props, State> {
} }
}); });
} catch (e) { } catch (e) {
window.console.error('Failed to connect to server:', e);
window.pushToast({ window.pushToast({
title: window.i18n('connectToServerFail'), title: window.i18n('connectToServerFail'),
id: 'connectToServerFail', id: 'connectToServer',
type: 'error', type: 'error',
}); });
} finally { } finally {

@ -613,7 +613,10 @@ export async function handleMessageEvent(event: MessageEvent): Promise<void> {
} }
if (!conversationId) { if (!conversationId) {
window.console.warn('Invalid conversation id for incoming message', conversationId); window.console.warn(
'Invalid conversation id for incoming message',
conversationId
);
} }
await window.ConversationController.getOrCreateAndWait(conversationId, type); await window.ConversationController.getOrCreateAndWait(conversationId, type);

@ -98,7 +98,9 @@ export class MultiDeviceProtocol {
primaryDevicePubKey, primaryDevicePubKey,
secondaryDevicePubKey, secondaryDevicePubKey,
requestSignature: StringUtils.encode(requestSignature, 'base64'), requestSignature: StringUtils.encode(requestSignature, 'base64'),
grantSignature: StringUtils.encode(grantSignature, 'base64'), grantSignature: grantSignature
? StringUtils.encode(grantSignature, 'base64')
: undefined,
}) })
); );

Loading…
Cancel
Save