diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 50ceeae78..b07282917 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -64,14 +64,6 @@ jobs: - name: Generate and concat files run: yarn build-everything - - name: Lint Files - # no need to lint files on all platforms. Just do it once on the quicker one - if: runner.os == 'Linux' - run: yarn lint-full - - - name: Unit Test - run: yarn test - - name: Build windows production binaries if: runner.os == 'Windows' run: node_modules\.bin\electron-builder --config.extraMetadata.environment=%SIGNAL_ENV% --publish=never --config.directories.output=release diff --git a/package.json b/package.json index 9d54cf536..17ef56126 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,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#3c206781fdc242aa1e4b03ff88c8ba501998dbff", + "libsession_util_nodejs": "https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.1.5/libsession_util_nodejs-v0.1.5.tar.gz", "libsodium-wrappers-sumo": "^0.7.9", "linkify-it": "3.0.2", "lodash": "^4.17.20", @@ -202,6 +202,7 @@ "jsdom-global": "^3.0.2", "mini-css-extract-plugin": "^2.7.5", "mocha": "10.0.0", + "nan": "^2.17.0", "node-gyp": "9.0.0", "node-loader": "^2.0.0", "nyc": "^15.1.0", diff --git a/ts/node/migration/sessionMigrations.ts b/ts/node/migration/sessionMigrations.ts index e3a796c8f..6348d2e31 100644 --- a/ts/node/migration/sessionMigrations.ts +++ b/ts/node/migration/sessionMigrations.ts @@ -1571,14 +1571,10 @@ function updateToSessionSchemaVersion30(currentVersion: number, db: BetterSqlite const ourDbProfileKey = fromHexToArray(ourConversation.profileKey || ''); const ourConvoPriority = ourConversation.priority; if (ourDbProfileUrl && !isEmpty(ourDbProfileKey)) { - userProfileWrapper.setUserInfo( - ourDbName, - ourConvoPriority, - ourDbProfileUrl || '', - ourDbProfileKey - ); - } else { - userProfileWrapper.setUserInfo(ourDbName, ourConvoPriority, '', new Uint8Array()); + userProfileWrapper.setUserInfo(ourDbName, ourConvoPriority, { + url: ourDbProfileUrl, + key: ourDbProfileKey, + }); } insertContactIntoContactWrapper( diff --git a/ts/session/utils/libsession/libsession_utils_user_profile.ts b/ts/session/utils/libsession/libsession_utils_user_profile.ts index ab81913d8..02e6ef3a8 100644 --- a/ts/session/utils/libsession/libsession_utils_user_profile.ts +++ b/ts/session/utils/libsession/libsession_utils_user_profile.ts @@ -24,15 +24,13 @@ async function insertUserProfileIntoWrapper(convoId: string) { await UserConfigWrapperActions.setUserInfo( dbName, ourConvo.get('priority') || CONVERSATION_PRIORITIES.default, - dbProfileUrl, - dbProfileKey + { url: dbProfileUrl, key: dbProfileKey } ); } else { await UserConfigWrapperActions.setUserInfo( dbName, ourConvo.get('priority') || CONVERSATION_PRIORITIES.default, - '', - new Uint8Array() + null ); } } diff --git a/ts/webworker/workers/browser/libsession_worker_interface.ts b/ts/webworker/workers/browser/libsession_worker_interface.ts index dfb58369a..807042443 100644 --- a/ts/webworker/workers/browser/libsession_worker_interface.ts +++ b/ts/webworker/workers/browser/libsession_worker_interface.ts @@ -96,8 +96,12 @@ export const UserConfigWrapperActions: UserConfigWrapperActionsCalls = { callLibSessionWorker(['UserConfig', 'getUserInfo']) as Promise< ReturnType >, - setUserInfo: async (name: string, priority: number, url: string, key: Uint8Array) => - callLibSessionWorker(['UserConfig', 'setUserInfo', name, priority, url, key]) as Promise< + setUserInfo: async ( + name: string, + priority: number, + profilePic: { url: string; key: Uint8Array } | null + ) => + callLibSessionWorker(['UserConfig', 'setUserInfo', name, priority, profilePic]) as Promise< ReturnType >, }; diff --git a/yarn.lock b/yarn.lock index 22b52d2cc..001b5bc23 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1704,7 +1704,7 @@ abab@^2.0.5, abab@^2.0.6: resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== -abbrev@1, abbrev@^1.0.0: +abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== @@ -5083,19 +5083,19 @@ 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#3c206781fdc242aa1e4b03ff88c8ba501998dbff": - version "0.1.0" - resolved "https://github.com/oxen-io/libsession-util-nodejs#3c206781fdc242aa1e4b03ff88c8ba501998dbff" +"libsession_util_nodejs@https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.1.4/libsession_util_nodejs-v0.1.4.tar.gz": + version "0.1.4" + resolved "https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.1.4/libsession_util_nodejs-v0.1.4.tar.gz#a31cf2030b1b23508628c9f353b25c392e87a804" dependencies: - nan "^2.17.0" - node-gyp "^9.3.0" + cmake-js "^7.2.1" + node-addon-api "^6.1.0" -"libsession_util_nodejs@https://github.com/oxen-io/libsession-util-nodejs#ec1c65776de580a62bc2e3498d931572ca97006f": - version "0.1.0" - resolved "https://github.com/oxen-io/libsession-util-nodejs#ec1c65776de580a62bc2e3498d931572ca97006f" +"libsession_util_nodejs@https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.1.5/libsession_util_nodejs-v0.1.5.tar.gz": + version "0.1.5" + resolved "https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.1.5/libsession_util_nodejs-v0.1.5.tar.gz#4f9dbac0c3011fc3edd29ce0625cba1044db6990" dependencies: - nan "^2.17.0" - node-gyp "^9.3.0" + cmake-js "^7.2.1" + node-addon-api "^6.1.0" libsodium-sumo@^0.7.0: version "0.7.10" @@ -5579,6 +5579,11 @@ nise@^4.0.1: just-extend "^4.0.2" path-to-regexp "^1.7.0" +node-addon-api@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-6.1.0.tgz#ac8470034e58e67d0c6f1204a18ae6995d9c0d76" + integrity sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA== + node-api-headers@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/node-api-headers/-/node-api-headers-0.0.2.tgz#31f4c6c2750b63e598128e76a60aefca6d76ac5d" @@ -5607,22 +5612,6 @@ node-gyp@9.0.0: tar "^6.1.2" which "^2.0.2" -node-gyp@^9.3.0: - version "9.3.1" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-9.3.1.tgz#1e19f5f290afcc9c46973d68700cbd21a96192e4" - integrity sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg== - dependencies: - env-paths "^2.2.0" - glob "^7.1.4" - graceful-fs "^4.2.6" - make-fetch-happen "^10.0.3" - nopt "^6.0.0" - npmlog "^6.0.0" - rimraf "^3.0.2" - semver "^7.3.5" - tar "^6.1.2" - which "^2.0.2" - node-loader@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/node-loader/-/node-loader-2.0.0.tgz#9109a6d828703fd3e0aa03c1baec12a798071562" @@ -5654,13 +5643,6 @@ nopt@^5.0.0: dependencies: abbrev "1" -nopt@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-6.0.0.tgz#245801d8ebf409c6df22ab9d95b65e1309cdb16d" - integrity sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g== - dependencies: - abbrev "^1.0.0" - normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"