fix: bump libsession to allow createdAt to be given during migration

pull/2795/head
Audric Ackermann 2 years ago
parent fed58161a0
commit 4280d83ba8

@ -100,7 +100,7 @@
"glob": "7.1.2",
"image-type": "^4.1.0",
"ip2country": "1.0.1",
"libsession_util_nodejs": "https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.1.19/libsession_util_nodejs-v0.1.19.tar.gz",
"libsession_util_nodejs": "https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.1.20/libsession_util_nodejs-v0.1.20.tar.gz",
"libsodium-wrappers-sumo": "^0.7.9",
"linkify-it": "3.0.2",
"lodash": "^4.17.21",

@ -1235,6 +1235,8 @@ function insertContactIntoContactWrapper(
dbProfileKey: contact.profileKey || undefined,
dbProfileUrl: contact.avatarPointer || undefined,
priority,
dbCreatedAtSeconds: Math.floor((contact.active_at || Date.now()) / 1000),
// expirationTimerSeconds,
});
@ -1259,6 +1261,7 @@ function insertContactIntoContactWrapper(
dbProfileKey: undefined,
dbProfileUrl: undefined,
priority: CONVERSATION_PRIORITIES.default,
dbCreatedAtSeconds: Math.floor(Date.now() / 1000),
// expirationTimerSeconds: 0,
})
);
@ -1308,7 +1311,7 @@ function insertCommunityIntoWrapper(
const convoId = community.id; // the id of a conversation has the prefix, the serverUrl and the roomToken already present, but not the pubkey
const roomDetails = sqlNode.getV2OpenGroupRoom(convoId, db);
hasDebugEnvVariable && console.info('insertCommunityIntoWrapper: ', community);
// hasDebugEnvVariable && console.info('insertCommunityIntoWrapper: ', community);
if (
!roomDetails ||

@ -70,6 +70,7 @@ async function insertContactFromDBIntoWrapperAndRefresh(id: string): Promise<voi
dbProfileKey,
dbProfileUrl,
priority,
dbCreatedAtSeconds: 0, // just give 0, now() will be used internally by the wrapper if the contact does not exist yet.
// expirationTimerSeconds,
});
try {

@ -115,6 +115,7 @@ export function getContactInfoFromDBValues({
priority,
dbProfileUrl,
dbProfileKey,
dbCreatedAtSeconds,
}: // expirationTimerSeconds,
{
id: string;
@ -124,6 +125,7 @@ export function getContactInfoFromDBValues({
dbNickname: string | undefined;
dbName: string | undefined;
priority: number;
dbCreatedAtSeconds: number;
dbProfileUrl: string | undefined;
dbProfileKey: string | undefined;
// expirationTimerSeconds: number | undefined;
@ -136,6 +138,7 @@ export function getContactInfoFromDBValues({
priority,
nickname: dbNickname,
name: dbName,
createdAtSeconds: dbCreatedAtSeconds,
// expirationTimerSeconds:
// !!expirationTimerSeconds && isFinite(expirationTimerSeconds) && expirationTimerSeconds > 0
// ? expirationTimerSeconds

@ -5148,9 +5148,9 @@ levn@~0.3.0:
prelude-ls "~1.1.2"
type-check "~0.3.2"
"libsession_util_nodejs@https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.1.19/libsession_util_nodejs-v0.1.19.tar.gz":
version "0.1.19"
resolved "https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.1.19/libsession_util_nodejs-v0.1.19.tar.gz#294c6e8ea6b767d375a9c0249bef98b65f3ae252"
"libsession_util_nodejs@https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.1.20/libsession_util_nodejs-v0.1.20.tar.gz":
version "0.1.20"
resolved "https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.1.20/libsession_util_nodejs-v0.1.20.tar.gz#4ff8331e4efb1725cf8bba0ef1af7496ebd8533d"
dependencies:
cmake-js "^7.2.1"
node-addon-api "^6.1.0"

Loading…
Cancel
Save