Fix edkey extraction

pull/1221/head
Maxim Shishmarev 5 years ago
parent 6919f53a45
commit ccc487528d

@ -521,8 +521,14 @@ function sendDeliveryReceipt(source: string, timestamp: any) {
// await getMessageQueue().sendUsingMultiDevice(device, receiptMessage);
}
interface MessageEvent {
data: any;
type: string;
confirm: () => void;
}
// tslint:disable:cyclomatic-complexity max-func-body-length */
export async function handleMessageEvent(event: any): Promise<void> {
export async function handleMessageEvent(event: MessageEvent): Promise<void> {
const { data, confirm } = event;
const isIncoming = event.type === 'message';

@ -325,6 +325,9 @@ export async function handleUnencryptedMessage({ message: outerMessage }: any) {
// Public chat messages from ourselves should be outgoing
type: isPublicChatMessage && isOurDevice ? 'sent' : 'message',
data: outerMessage,
confirm: () => {
/* do nothing */
},
};
await handleMessageEvent(ev);

@ -218,7 +218,7 @@ class OnionPaths {
log.info('new guard nodes: ', guardNodes);
const edKeys = guardNodes.map(n => _.pick(n, 'pubkey_ed25519'));
const edKeys = guardNodes.map(n => n.pubkey_ed25519);
await window.libloki.storage.updateGuardNodes(edKeys);

Loading…
Cancel
Save