fix: bump libsession and remove manual unwrapping/wrapping of push()

pull/3118/head
Audric Ackermann 10 months ago
parent 7ad91ca79b
commit 534cebf5c4

@ -1,3 +1,4 @@
name: 'Setup and build' name: 'Setup and build'
description: 'Setup and build Session Desktop' description: 'Setup and build Session Desktop'
runs: runs:

@ -95,7 +95,7 @@
"fs-extra": "9.0.0", "fs-extra": "9.0.0",
"glob": "7.1.2", "glob": "7.1.2",
"image-type": "^4.1.0", "image-type": "^4.1.0",
"libsession_util_nodejs": "https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.3.1/libsession_util_nodejs-v0.3.1.tar.gz", "libsession_util_nodejs": "https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.3.19/libsession_util_nodejs-v0.3.19.tar.gz",
"libsodium-wrappers-sumo": "^0.7.9", "libsodium-wrappers-sumo": "^0.7.9",
"linkify-it": "^4.0.1", "linkify-it": "^4.0.1",
"lodash": "^4.17.21", "lodash": "^4.17.21",

@ -18,7 +18,6 @@ import { OpenGroupUtils } from '../session/apis/open_group_api/utils';
import { getOpenGroupV2ConversationId } from '../session/apis/open_group_api/utils/OpenGroupUtils'; import { getOpenGroupV2ConversationId } from '../session/apis/open_group_api/utils/OpenGroupUtils';
import { getSwarmPollingInstance } from '../session/apis/snode_api'; import { getSwarmPollingInstance } from '../session/apis/snode_api';
import { getConversationController } from '../session/conversations'; import { getConversationController } from '../session/conversations';
import { IncomingMessage } from '../session/messages/incoming/IncomingMessage';
import { Profile, ProfileManager } from '../session/profile_manager/ProfileManager'; import { Profile, ProfileManager } from '../session/profile_manager/ProfileManager';
import { PubKey } from '../session/types'; import { PubKey } from '../session/types';
import { StringUtils, UserUtils } from '../session/utils'; import { StringUtils, UserUtils } from '../session/utils';
@ -43,6 +42,8 @@ import {
} from '../util/storage'; } from '../util/storage';
// eslint-disable-next-line import/no-unresolved // eslint-disable-next-line import/no-unresolved
import { SnodeNamespaces } from '../session/apis/snode_api/namespaces';
import { RetrieveMessageItemWithNamespace } from '../session/apis/snode_api/types';
import { ConfigWrapperObjectTypes } from '../webworker/workers/browser/libsession_worker_functions'; import { ConfigWrapperObjectTypes } from '../webworker/workers/browser/libsession_worker_functions';
import { import {
ContactsWrapperActions, ContactsWrapperActions,
@ -57,18 +58,29 @@ import { HexKeyPair } from './keypairs';
import { queueAllCachedFromSource } from './receiver'; import { queueAllCachedFromSource } from './receiver';
import { EnvelopePlus } from './types'; import { EnvelopePlus } from './types';
function groupByVariant( function groupByNamespace(incomingConfigs: Array<RetrieveMessageItemWithNamespace>) {
incomingConfigs: Array<IncomingMessage<SignalService.ISharedConfigMessage>>
) {
const groupedByVariant: Map< const groupedByVariant: Map<
ConfigWrapperObjectTypes, ConfigWrapperObjectTypes,
Array<IncomingMessage<SignalService.ISharedConfigMessage>> Array<RetrieveMessageItemWithNamespace>
> = new Map(); > = new Map();
incomingConfigs.forEach(incomingConfig => { incomingConfigs.forEach(incomingConfig => {
const { kind } = incomingConfig.message; const { namespace } = incomingConfig;
const wrapperId = LibSessionUtil.kindToVariant(kind); const wrapperId: ConfigWrapperObjectTypes | null =
namespace === SnodeNamespaces.UserProfile
? 'UserConfig'
: namespace === SnodeNamespaces.UserContacts
? 'ContactsConfig'
: namespace === SnodeNamespaces.UserGroups
? 'UserGroupsConfig'
: namespace === SnodeNamespaces.ConvoInfoVolatile
? 'ConvoInfoVolatileConfig'
: null;
if (!wrapperId) {
throw new Error('Unexpected wrapperId');
}
if (!groupedByVariant.has(wrapperId)) { if (!groupedByVariant.has(wrapperId)) {
groupedByVariant.set(wrapperId, []); groupedByVariant.set(wrapperId, []);
@ -80,10 +92,10 @@ function groupByVariant(
} }
async function mergeConfigsWithIncomingUpdates( async function mergeConfigsWithIncomingUpdates(
incomingConfigs: Array<IncomingMessage<SignalService.ISharedConfigMessage>> incomingConfigs: Array<RetrieveMessageItemWithNamespace>
): Promise<Map<ConfigWrapperObjectTypes, IncomingConfResult>> { ): Promise<Map<ConfigWrapperObjectTypes, IncomingConfResult>> {
// first, group by variant so we do a single merge call // first, group by variant so we do a single merge call
const groupedByVariant = groupByVariant(incomingConfigs); const groupedByNamespace = groupByNamespace(incomingConfigs);
const groupedResults: Map<ConfigWrapperObjectTypes, IncomingConfResult> = new Map(); const groupedResults: Map<ConfigWrapperObjectTypes, IncomingConfResult> = new Map();
@ -91,15 +103,15 @@ async function mergeConfigsWithIncomingUpdates(
const publicKey = UserUtils.getOurPubKeyStrFromCache(); const publicKey = UserUtils.getOurPubKeyStrFromCache();
try { try {
for (let index = 0; index < groupedByVariant.size; index++) { for (let index = 0; index < groupedByNamespace.size; index++) {
const variant = [...groupedByVariant.keys()][index]; const variant = [...groupedByNamespace.keys()][index];
const sameVariant = groupedByVariant.get(variant); const sameVariant = groupedByNamespace.get(variant);
if (!sameVariant?.length) { if (!sameVariant?.length) {
continue; continue;
} }
const toMerge = sameVariant.map(msg => ({ const toMerge = sameVariant.map(msg => ({
data: msg.message.data, data: StringUtils.fromBase64ToArray(msg.data),
hash: msg.messageHash, hash: msg.hash,
})); }));
if (window.sessionFeatureFlags.debug.debugLibsessionDumps) { if (window.sessionFeatureFlags.debug.debugLibsessionDumps) {
window.log.info( window.log.info(
@ -110,9 +122,7 @@ async function mergeConfigsWithIncomingUpdates(
for (let dumpIndex = 0; dumpIndex < toMerge.length; dumpIndex++) { for (let dumpIndex = 0; dumpIndex < toMerge.length; dumpIndex++) {
const element = toMerge[dumpIndex]; const element = toMerge[dumpIndex];
window.log.info( window.log.info(
`printDumpsForDebugging: toMerge of ${dumpIndex}:${element.hash}: ${StringUtils.toHex( `printDumpsForDebugging: toMerge of ${dumpIndex}:${element.hash}: ${element.data} `,
element.data
)} `,
StringUtils.toHex(await GenericWrapperActions.dump(variant)) StringUtils.toHex(await GenericWrapperActions.dump(variant))
); );
} }
@ -122,8 +132,8 @@ async function mergeConfigsWithIncomingUpdates(
const needsPush = await GenericWrapperActions.needsPush(variant); const needsPush = await GenericWrapperActions.needsPush(variant);
const needsDump = await GenericWrapperActions.needsDump(variant); const needsDump = await GenericWrapperActions.needsDump(variant);
const mergedTimestamps = sameVariant const mergedTimestamps = sameVariant
.filter(m => hashesMerged.includes(m.messageHash)) .filter(m => hashesMerged.includes(m.hash))
.map(m => m.envelopeTimestamp); .map(m => m.timestamp);
const latestEnvelopeTimestamp = Math.max(...mergedTimestamps); const latestEnvelopeTimestamp = Math.max(...mergedTimestamps);
window.log.debug( window.log.debug(
@ -895,7 +905,7 @@ async function processMergingResults(results: Map<ConfigWrapperObjectTypes, Inco
} }
async function handleConfigMessagesViaLibSession( async function handleConfigMessagesViaLibSession(
configMessages: Array<IncomingMessage<SignalService.ISharedConfigMessage>> configMessages: Array<RetrieveMessageItemWithNamespace>
) { ) {
const userConfigLibsession = await ReleasedFeatures.checkIsUserConfigFeatureReleased(); const userConfigLibsession = await ReleasedFeatures.checkIsUserConfigFeatureReleased();
@ -910,9 +920,8 @@ async function handleConfigMessagesViaLibSession(
window?.log?.debug( window?.log?.debug(
`Handling our sharedConfig message via libsession_util ${JSON.stringify( `Handling our sharedConfig message via libsession_util ${JSON.stringify(
configMessages.map(m => ({ configMessages.map(m => ({
variant: LibSessionUtil.kindToVariant(m.message.kind), namespace: m.namespace,
hash: m.messageHash, hash: m.hash,
seqno: (m.message.seqno as Long).toNumber(),
})) }))
)}` )}`
); );

@ -1,7 +1,7 @@
/* eslint-disable no-await-in-loop */ /* eslint-disable no-await-in-loop */
/* eslint-disable more/no-then */ /* eslint-disable more/no-then */
/* eslint-disable @typescript-eslint/no-misused-promises */ /* eslint-disable @typescript-eslint/no-misused-promises */
import { compact, concat, flatten, last, sample, toNumber, uniqBy } from 'lodash'; import { compact, concat, flatten, last, sample, uniqBy } from 'lodash';
import { Data, Snode } from '../../../data/data'; import { Data, Snode } from '../../../data/data';
import { SignalService } from '../../../protobuf'; import { SignalService } from '../../../protobuf';
import * as Receiver from '../../../receiver/receiver'; import * as Receiver from '../../../receiver/receiver';
@ -11,8 +11,6 @@ import * as snodePool from './snodePool';
import { ConversationModel } from '../../../models/conversation'; import { ConversationModel } from '../../../models/conversation';
import { ConfigMessageHandler } from '../../../receiver/configMessage'; import { ConfigMessageHandler } from '../../../receiver/configMessage';
import { decryptEnvelopeWithOurKey } from '../../../receiver/contentMessage';
import { EnvelopePlus } from '../../../receiver/types';
import { updateIsOnline } from '../../../state/ducks/onion'; import { updateIsOnline } from '../../../state/ducks/onion';
import { ReleasedFeatures } from '../../../util/releaseFeature'; import { ReleasedFeatures } from '../../../util/releaseFeature';
import { import {
@ -21,15 +19,18 @@ import {
} from '../../../webworker/workers/browser/libsession_worker_interface'; } from '../../../webworker/workers/browser/libsession_worker_interface';
import { DURATION, SWARM_POLLING_TIMEOUT } from '../../constants'; import { DURATION, SWARM_POLLING_TIMEOUT } from '../../constants';
import { getConversationController } from '../../conversations'; import { getConversationController } from '../../conversations';
import { IncomingMessage } from '../../messages/incoming/IncomingMessage';
import { StringUtils, UserUtils } from '../../utils'; import { StringUtils, UserUtils } from '../../utils';
import { ed25519Str } from '../../utils/String';
import { LibSessionUtil } from '../../utils/libsession/libsession_utils'; import { LibSessionUtil } from '../../utils/libsession/libsession_utils';
import { SnodeNamespace, SnodeNamespaces } from './namespaces'; import { SnodeNamespace, SnodeNamespaces } from './namespaces';
import { SnodeAPIRetrieve } from './retrieveRequest'; import { SnodeAPIRetrieve } from './retrieveRequest';
import { RetrieveMessageItem, RetrieveMessagesResultsBatched } from './types'; import {
import { ed25519Str } from '../../utils/String'; RetrieveMessageItem,
RetrieveMessageItemWithNamespace,
RetrieveMessagesResultsBatched,
} from './types';
export function extractWebSocketContent( function extractWebSocketContent(
message: string, message: string,
messageHash: string messageHash: string
): null | { ): null | {
@ -265,9 +266,16 @@ export class SwarmPolling {
// check if we just fetched the details from the config namespaces. // check if we just fetched the details from the config namespaces.
// If yes, merge them together and exclude them from the rest of the messages. // If yes, merge them together and exclude them from the rest of the messages.
if (userConfigLibsession && resultsFromAllNamespaces) { if (userConfigLibsession && resultsFromAllNamespaces) {
const userConfigMessages = resultsFromAllNamespaces const userConfigMessages = resultsFromAllNamespaces.filter(m =>
.filter(m => SnodeNamespace.isUserConfigNamespace(m.namespace)) SnodeNamespace.isUserConfigNamespace(m.namespace)
.map(r => r.messages.messages); );
const userConfigMessagesWithNamespace: Array<Array<RetrieveMessageItemWithNamespace>> =
userConfigMessages.map(r => {
return (r.messages.messages || []).map(m => {
return { ...m, namespace: r.namespace };
});
});
allNamespacesWithoutUserConfigIfNeeded = flatten( allNamespacesWithoutUserConfigIfNeeded = flatten(
compact( compact(
@ -283,7 +291,7 @@ export class SwarmPolling {
`received userConfigMessages count: ${userConfigMessagesMerged.length} for key ${pubkey.key}` `received userConfigMessages count: ${userConfigMessagesMerged.length} for key ${pubkey.key}`
); );
try { try {
await this.handleSharedConfigMessages(userConfigMessagesMerged); await this.handleSharedConfigMessages(flatten(userConfigMessagesWithNamespace));
} catch (e) { } catch (e) {
window.log.warn( window.log.warn(
`handleSharedConfigMessages of ${userConfigMessagesMerged.length} failed with ${e.message}` `handleSharedConfigMessages of ${userConfigMessagesMerged.length} failed with ${e.message}`
@ -365,58 +373,22 @@ export class SwarmPolling {
} }
} }
private async handleSharedConfigMessages(userConfigMessagesMerged: Array<RetrieveMessageItem>) { private async handleSharedConfigMessages(
const extractedUserConfigMessage = compact( userConfigMessagesMerged: Array<RetrieveMessageItemWithNamespace>
userConfigMessagesMerged.map((m: RetrieveMessageItem) => { ) {
return extractWebSocketContent(m.data, m.hash); if (!userConfigMessagesMerged.length) {
}) return;
);
const allDecryptedConfigMessages: Array<IncomingMessage<SignalService.ISharedConfigMessage>> =
[];
for (let index = 0; index < extractedUserConfigMessage.length; index++) {
const userConfigMessage = extractedUserConfigMessage[index];
try {
const envelope: EnvelopePlus = SignalService.Envelope.decode(userConfigMessage.body) as any;
const decryptedEnvelope = await decryptEnvelopeWithOurKey(envelope);
if (!decryptedEnvelope?.byteLength) {
continue;
}
const content = SignalService.Content.decode(new Uint8Array(decryptedEnvelope));
if (content.sharedConfigMessage) {
const asIncomingMsg: IncomingMessage<SignalService.ISharedConfigMessage> = {
envelopeTimestamp: toNumber(envelope.timestamp),
message: content.sharedConfigMessage,
messageHash: userConfigMessage.messageHash,
authorOrGroupPubkey: envelope.source,
authorInGroup: envelope.senderIdentity,
};
allDecryptedConfigMessages.push(asIncomingMsg);
} else {
throw new Error(
'received a message from the namespace reserved for user config but it did not contain a sharedConfigMessage'
);
}
} catch (e) {
window.log.warn(
`failed to decrypt message with hash "${userConfigMessage.messageHash}": ${e.message}`
);
}
} }
if (allDecryptedConfigMessages.length) { try {
try { window.log.info(
window.log.info( `handleConfigMessagesViaLibSession of "${userConfigMessagesMerged.length}" messages with libsession`
`handleConfigMessagesViaLibSession of "${allDecryptedConfigMessages.length}" messages with libsession` );
); await ConfigMessageHandler.handleConfigMessagesViaLibSession(userConfigMessagesMerged);
await ConfigMessageHandler.handleConfigMessagesViaLibSession(allDecryptedConfigMessages); } catch (e) {
} catch (e) { const allMessageHases = userConfigMessagesMerged.map(m => m.hash).join(',');
const allMessageHases = allDecryptedConfigMessages.map(m => m.messageHash).join(','); window.log.warn(
window.log.warn( `failed to handle messages hashes "${allMessageHases}" with libsession. Error: "${e.message}"`
`failed to handle messages hashes "${allMessageHases}" with libsession. Error: "${e.message}"` );
);
}
} }
} }

@ -7,6 +7,8 @@ export type RetrieveMessageItem = {
timestamp: number; timestamp: number;
}; };
export type RetrieveMessageItemWithNamespace = RetrieveMessageItem & { namespace: number };
export type RetrieveMessagesResultsContent = { export type RetrieveMessagesResultsContent = {
hf?: Array<number>; hf?: Array<number>;
messages?: Array<RetrieveMessageItem>; messages?: Array<RetrieveMessageItem>;

@ -9,36 +9,26 @@ import { MessageParams } from '../Message';
interface SharedConfigParams extends MessageParams { interface SharedConfigParams extends MessageParams {
seqno: Long; seqno: Long;
kind: SignalService.SharedConfigMessage.Kind; kind: SignalService.SharedConfigMessage.Kind;
data: Uint8Array; readyToSendData: Uint8Array;
} }
export class SharedConfigMessage extends ContentMessage { export class SharedConfigMessage extends ContentMessage {
public readonly seqno: Long; public readonly seqno: Long;
public readonly kind: SignalService.SharedConfigMessage.Kind; public readonly kind: SignalService.SharedConfigMessage.Kind;
public readonly data: Uint8Array; public readonly readyToSendData: Uint8Array;
constructor(params: SharedConfigParams) { constructor(params: SharedConfigParams) {
super({ timestamp: params.timestamp, identifier: params.identifier }); super({ timestamp: params.timestamp, identifier: params.identifier });
this.data = params.data; this.readyToSendData = params.readyToSendData;
this.kind = params.kind; this.kind = params.kind;
this.seqno = params.seqno; this.seqno = params.seqno;
} }
public contentProto(): SignalService.Content { public contentProto(): SignalService.Content {
return new SignalService.Content({ throw new Error('SharedConfigMessage must not be sent wrapped anymore');
sharedConfigMessage: this.sharedConfigProto(),
});
} }
public ttl(): number { public ttl(): number {
return TTL_DEFAULT.CONFIG_MESSAGE; return TTL_DEFAULT.CONFIG_MESSAGE;
} }
protected sharedConfigProto(): SignalService.SharedConfigMessage {
return new SignalService.SharedConfigMessage({
data: this.data,
kind: this.kind,
seqno: this.seqno,
});
}
} }

@ -379,32 +379,20 @@ async function sendMessagesToSnode(
try { try {
const recipient = PubKey.cast(destination); const recipient = PubKey.cast(destination);
const encryptedAndWrapped = await encryptMessagesAndWrap( const encryptedAndWrapped: Array<Omit<EncryptAndWrapMessageResults, 'data' | 'isSyncMessage'>> =
params.map(m => ({ [];
destination: m.pubkey,
plainTextBuffer: m.message.plainTextBuffer(), params.forEach(m => {
namespace: m.namespace, const wrapped = {
ttl: m.message.ttl(),
identifier: m.message.identifier, identifier: m.message.identifier,
isSyncMessage: MessageSender.isContentSyncMessage(m.message), isSyncMessage: MessageSender.isContentSyncMessage(m.message),
})) namespace: m.namespace,
); ttl: m.message.ttl(),
networkTimestamp: GetNetworkTime.getNowWithNetworkOffset(),
// first update all the associated timestamps of our messages in DB, if the outgoing messages are associated with one. data64: ByteBuffer.wrap(m.message.readyToSendData).toString('base64'),
await Promise.all( };
encryptedAndWrapped.map(async (m, index) => { encryptedAndWrapped.push(wrapped);
// make sure to update the local sent_at timestamp, because sometimes, we will get the just pushed message in the receiver side });
// before we return from the await below.
// and the isDuplicate messages relies on sent_at timestamp to be valid.
const found = await Data.getMessageById(m.identifier);
// make sure to not update the sent timestamp if this a currently syncing message
if (found && !found.get('sentSync')) {
found.set({ sent_at: encryptedAndWrapped[index].networkTimestamp });
await found.commit();
}
})
);
const batchResults = await pRetry( const batchResults = await pRetry(
async () => { async () => {
@ -432,35 +420,6 @@ async function sendMessagesToSnode(
throw new Error('result is empty for sendMessagesToSnode'); throw new Error('result is empty for sendMessagesToSnode');
} }
const isDestinationClosedGroup = getConversationController()
.get(recipient.key)
?.isClosedGroup();
await Promise.all(
encryptedAndWrapped.map(async (message, index) => {
// If message also has a sync message, save that hash. Otherwise save the hash from the regular message send i.e. only closed groups in this case.
if (
message.identifier &&
(message.isSyncMessage || isDestinationClosedGroup) &&
batchResults[index] &&
!isEmpty(batchResults[index]) &&
isString(batchResults[index].body.hash)
) {
const hashFoundInResponse = batchResults[index].body.hash;
const foundMessage = await Data.getMessageById(message.identifier);
if (foundMessage) {
await foundMessage.updateMessageHash(hashFoundInResponse);
await foundMessage.commit();
window?.log?.info(
`updated message ${foundMessage.get('id')} with hash: ${foundMessage.get(
'messageHash'
)}`
);
}
}
})
);
return batchResults; return batchResults;
} catch (e) { } catch (e) {
window.log.warn(`sendMessagesToSnode failed with ${e.message}`); window.log.warn(`sendMessagesToSnode failed with ${e.message}`);

@ -225,7 +225,7 @@ class ConfigurationSyncJob extends PersistedJob<ConfigurationSyncPersistedData>
...m, ...m,
message: { message: {
...m.message, ...m.message,
data: to_hex(m.message.data), readyToSendData: to_hex(m.message.readyToSendData),
}, },
}; };
}) })

@ -127,14 +127,14 @@ async function pendingChangesForPubkey(pubkey: string): Promise<Array<OutgoingCo
} }
variantsNeedingPush.add(variant); variantsNeedingPush.add(variant);
const { data, seqno, hashes } = await GenericWrapperActions.push(variant); const { data: readyToSendData, seqno, hashes } = await GenericWrapperActions.push(variant);
const kind = variantToKind(variant); const kind = variantToKind(variant);
const namespace = await GenericWrapperActions.storageNamespace(variant); const namespace = await GenericWrapperActions.storageNamespace(variant);
results.push({ results.push({
message: new SharedConfigMessage({ message: new SharedConfigMessage({
data, readyToSendData,
kind, kind,
seqno: Long.fromNumber(seqno), seqno: Long.fromNumber(seqno),
timestamp: GetNetworkTime.getNowWithNetworkOffset(), timestamp: GetNetworkTime.getNowWithNetworkOffset(),

@ -46,6 +46,11 @@ export const GenericWrapperActions = {
) => ) =>
/** base wrapper generic actions */ /** base wrapper generic actions */
callLibSessionWorker([wrapperId, 'init', ed25519Key, dump]) as Promise<void>, callLibSessionWorker([wrapperId, 'init', ed25519Key, dump]) as Promise<void>,
/** This function is used to free wrappers from memory only.
*
* See freeUserWrapper() in libsession.worker.ts */
free: async (wrapperId: ConfigWrapperObjectTypes) =>
callLibSessionWorker([wrapperId, 'free']) as Promise<void>,
confirmPushed: async (wrapperId: ConfigWrapperObjectTypes, seqno: number, hash: string) => confirmPushed: async (wrapperId: ConfigWrapperObjectTypes, seqno: number, hash: string) =>
callLibSessionWorker([wrapperId, 'confirmPushed', seqno, hash]) as ReturnType< callLibSessionWorker([wrapperId, 'confirmPushed', seqno, hash]) as ReturnType<
BaseWrapperActionsCalls['confirmPushed'] BaseWrapperActionsCalls['confirmPushed']
@ -87,6 +92,7 @@ export const UserConfigWrapperActions: UserConfigWrapperActionsCalls = {
/* Reuse the GenericWrapperActions with the UserConfig argument */ /* Reuse the GenericWrapperActions with the UserConfig argument */
init: async (ed25519Key: Uint8Array, dump: Uint8Array | null) => init: async (ed25519Key: Uint8Array, dump: Uint8Array | null) =>
GenericWrapperActions.init('UserConfig', ed25519Key, dump), GenericWrapperActions.init('UserConfig', ed25519Key, dump),
free: async () => GenericWrapperActions.free('UserConfig'),
confirmPushed: async (seqno: number, hash: string) => confirmPushed: async (seqno: number, hash: string) =>
GenericWrapperActions.confirmPushed('UserConfig', seqno, hash), GenericWrapperActions.confirmPushed('UserConfig', seqno, hash),
dump: async () => GenericWrapperActions.dump('UserConfig'), dump: async () => GenericWrapperActions.dump('UserConfig'),
@ -135,6 +141,7 @@ export const ContactsWrapperActions: ContactsWrapperActionsCalls = {
/* Reuse the GenericWrapperActions with the ContactConfig argument */ /* Reuse the GenericWrapperActions with the ContactConfig argument */
init: async (ed25519Key: Uint8Array, dump: Uint8Array | null) => init: async (ed25519Key: Uint8Array, dump: Uint8Array | null) =>
GenericWrapperActions.init('ContactsConfig', ed25519Key, dump), GenericWrapperActions.init('ContactsConfig', ed25519Key, dump),
free: async () => GenericWrapperActions.free('ContactsConfig'),
confirmPushed: async (seqno: number, hash: string) => confirmPushed: async (seqno: number, hash: string) =>
GenericWrapperActions.confirmPushed('ContactsConfig', seqno, hash), GenericWrapperActions.confirmPushed('ContactsConfig', seqno, hash),
dump: async () => GenericWrapperActions.dump('ContactsConfig'), dump: async () => GenericWrapperActions.dump('ContactsConfig'),
@ -171,6 +178,7 @@ export const UserGroupsWrapperActions: UserGroupsWrapperActionsCalls = {
/* Reuse the GenericWrapperActions with the ContactConfig argument */ /* Reuse the GenericWrapperActions with the ContactConfig argument */
init: async (ed25519Key: Uint8Array, dump: Uint8Array | null) => init: async (ed25519Key: Uint8Array, dump: Uint8Array | null) =>
GenericWrapperActions.init('UserGroupsConfig', ed25519Key, dump), GenericWrapperActions.init('UserGroupsConfig', ed25519Key, dump),
free: async () => GenericWrapperActions.free('UserGroupsConfig'),
confirmPushed: async (seqno: number, hash: string) => confirmPushed: async (seqno: number, hash: string) =>
GenericWrapperActions.confirmPushed('UserGroupsConfig', seqno, hash), GenericWrapperActions.confirmPushed('UserGroupsConfig', seqno, hash),
dump: async () => GenericWrapperActions.dump('UserGroupsConfig'), dump: async () => GenericWrapperActions.dump('UserGroupsConfig'),
@ -244,6 +252,7 @@ export const ConvoInfoVolatileWrapperActions: ConvoInfoVolatileWrapperActionsCal
/* Reuse the GenericWrapperActions with the ContactConfig argument */ /* Reuse the GenericWrapperActions with the ContactConfig argument */
init: async (ed25519Key: Uint8Array, dump: Uint8Array | null) => init: async (ed25519Key: Uint8Array, dump: Uint8Array | null) =>
GenericWrapperActions.init('ConvoInfoVolatileConfig', ed25519Key, dump), GenericWrapperActions.init('ConvoInfoVolatileConfig', ed25519Key, dump),
free: async () => GenericWrapperActions.free('ConvoInfoVolatileConfig'),
confirmPushed: async (seqno: number, hash: string) => confirmPushed: async (seqno: number, hash: string) =>
GenericWrapperActions.confirmPushed('ConvoInfoVolatileConfig', seqno, hash), GenericWrapperActions.confirmPushed('ConvoInfoVolatileConfig', seqno, hash),
dump: async () => GenericWrapperActions.dump('ConvoInfoVolatileConfig'), dump: async () => GenericWrapperActions.dump('ConvoInfoVolatileConfig'),

@ -2877,12 +2877,12 @@ available-typed-arrays@^1.0.5, available-typed-arrays@^1.0.6:
dependencies: dependencies:
possible-typed-array-names "^1.0.0" possible-typed-array-names "^1.0.0"
axios@^1.3.2: axios@^1.6.5:
version "1.6.2" version "1.7.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.2.tgz#de67d42c755b571d3e698df1b6504cde9b0ee9f2" resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.2.tgz#b625db8a7051fbea61c35a3cbb3a1daa7b9c7621"
integrity sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A== integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==
dependencies: dependencies:
follow-redirects "^1.15.0" follow-redirects "^1.15.6"
form-data "^4.0.0" form-data "^4.0.0"
proxy-from-env "^1.1.0" proxy-from-env "^1.1.0"
@ -3494,23 +3494,23 @@ clsx@^1.0.4, clsx@^1.1.1, clsx@^1.2.1:
integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==
cmake-js@^7.2.1: cmake-js@^7.2.1:
version "7.2.1" version "7.3.0"
resolved "https://registry.yarnpkg.com/cmake-js/-/cmake-js-7.2.1.tgz#757c0d39994121b084bab96290baf115ee7712cd" resolved "https://registry.yarnpkg.com/cmake-js/-/cmake-js-7.3.0.tgz#6fd6234b7aeec4545c1c806f9e3f7ffacd9798b2"
integrity sha512-AdPSz9cSIJWdKvm0aJgVu3X8i0U3mNTswJkSHzZISqmYVjZk7Td4oDFg0mCBA383wO+9pG5Ix7pEP1CZH9x2BA== integrity sha512-dXs2zq9WxrV87bpJ+WbnGKv8WUBXDw8blNiwNHoRe/it+ptscxhQHKB1SJXa1w+kocLMeP28Tk4/eTCezg4o+w==
dependencies: dependencies:
axios "^1.3.2" axios "^1.6.5"
debug "^4" debug "^4"
fs-extra "^10.1.0" fs-extra "^11.2.0"
lodash.isplainobject "^4.0.6" lodash.isplainobject "^4.0.6"
memory-stream "^1.0.0" memory-stream "^1.0.0"
node-api-headers "^0.0.2" node-api-headers "^1.1.0"
npmlog "^6.0.2" npmlog "^6.0.2"
rc "^1.2.7" rc "^1.2.7"
semver "^7.3.8" semver "^7.5.4"
tar "^6.1.11" tar "^6.2.0"
url-join "^4.0.1" url-join "^4.0.1"
which "^2.0.2" which "^2.0.2"
yargs "^17.6.0" yargs "^17.7.2"
color-convert@^1.9.0: color-convert@^1.9.0:
version "1.9.3" version "1.9.3"
@ -3905,7 +3905,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.6.8, debug@^2.6.9:
dependencies: dependencies:
ms "2.0.0" ms "2.0.0"
debug@4, debug@4.3.4, debug@^4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: debug@4, debug@4.3.4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4:
version "4.3.4" version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
@ -3919,6 +3919,13 @@ debug@^3.2.7:
dependencies: dependencies:
ms "^2.1.1" ms "^2.1.1"
debug@^4:
version "4.3.5"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e"
integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==
dependencies:
ms "2.1.2"
decamelize-keys@^1.1.0: decamelize-keys@^1.1.0:
version "1.1.1" version "1.1.1"
resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.1.tgz#04a2d523b2f18d80d0158a43b895d56dff8d19d8" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.1.tgz#04a2d523b2f18d80d0158a43b895d56dff8d19d8"
@ -5067,10 +5074,10 @@ focus-trap@^7.5.4:
dependencies: dependencies:
tabbable "^6.2.0" tabbable "^6.2.0"
follow-redirects@^1.15.0: follow-redirects@^1.15.6:
version "1.15.3" version "1.15.6"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b"
integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==
for-each@^0.3.3: for-each@^0.3.3:
version "0.3.3" version "0.3.3"
@ -5130,6 +5137,15 @@ fs-extra@^11.0.0:
jsonfile "^6.0.1" jsonfile "^6.0.1"
universalify "^2.0.0" universalify "^2.0.0"
fs-extra@^11.2.0:
version "11.2.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b"
integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==
dependencies:
graceful-fs "^4.2.0"
jsonfile "^6.0.1"
universalify "^2.0.0"
fs-extra@^8.1.0: fs-extra@^8.1.0:
version "8.1.0" version "8.1.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
@ -6526,9 +6542,9 @@ levn@~0.3.0:
prelude-ls "~1.1.2" prelude-ls "~1.1.2"
type-check "~0.3.2" type-check "~0.3.2"
"libsession_util_nodejs@https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.3.1/libsession_util_nodejs-v0.3.1.tar.gz": "libsession_util_nodejs@https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.3.19/libsession_util_nodejs-v0.3.19.tar.gz":
version "0.3.1" version "0.3.19"
resolved "https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.3.1/libsession_util_nodejs-v0.3.1.tar.gz#d2c94bfaae6e3ef594609abb08cf8be485fa5d39" resolved "https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.3.19/libsession_util_nodejs-v0.3.19.tar.gz#221c1fc34fcc18601aea4ce1b733ebfa55af66ea"
dependencies: dependencies:
cmake-js "^7.2.1" cmake-js "^7.2.1"
node-addon-api "^6.1.0" node-addon-api "^6.1.0"
@ -7393,10 +7409,10 @@ node-addon-api@^6.1.0:
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-6.1.0.tgz#ac8470034e58e67d0c6f1204a18ae6995d9c0d76" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-6.1.0.tgz#ac8470034e58e67d0c6f1204a18ae6995d9c0d76"
integrity sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA== integrity sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==
node-api-headers@^0.0.2: node-api-headers@^1.1.0:
version "0.0.2" version "1.1.0"
resolved "https://registry.yarnpkg.com/node-api-headers/-/node-api-headers-0.0.2.tgz#31f4c6c2750b63e598128e76a60aefca6d76ac5d" resolved "https://registry.yarnpkg.com/node-api-headers/-/node-api-headers-1.1.0.tgz#3f9dd7bb10b29e1c3e3db675979605a308b2373c"
integrity sha512-YsjmaKGPDkmhoNKIpkChtCsPVaRE0a274IdERKnuc/E8K1UJdBZ4/mvI006OijlQZHCfpRNOH3dfHQs92se8gg== integrity sha512-ucQW+SbYCUPfprvmzBsnjT034IGRB2XK8rRc78BgjNKhTdFKgAwAmgW704bKIBmcYW48it0Gkjpkd39Azrwquw==
node-dir@^0.1.17: node-dir@^0.1.17:
version "0.1.17" version "0.1.17"
@ -9584,6 +9600,18 @@ tar@^6.1.0, tar@^6.1.11:
mkdirp "^1.0.3" mkdirp "^1.0.3"
yallist "^4.0.0" yallist "^4.0.0"
tar@^6.2.0:
version "6.2.1"
resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a"
integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==
dependencies:
chownr "^2.0.0"
fs-minipass "^2.0.0"
minipass "^5.0.0"
minizlib "^2.1.1"
mkdirp "^1.0.3"
yallist "^4.0.0"
temp-dir@^2.0.0: temp-dir@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e" resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e"
@ -10536,7 +10564,7 @@ yargs@^15.1.0:
y18n "^4.0.0" y18n "^4.0.0"
yargs-parser "^18.1.2" yargs-parser "^18.1.2"
yargs@^17.0.0, yargs@^17.0.1, yargs@^17.6.0, yargs@^17.6.2: yargs@^17.0.0, yargs@^17.0.1, yargs@^17.6.2, yargs@^17.7.2:
version "17.7.2" version "17.7.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==

Loading…
Cancel
Save