From fc20bafde38408a57239345b1ebf2a7e676ad5dd Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 4 Dec 2024 09:56:57 +1100 Subject: [PATCH 1/9] fix: send approved message only when previously unapproved --- ts/interactions/conversationInteractions.ts | 2 +- ts/session/utils/calling/CallManager.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ts/interactions/conversationInteractions.ts b/ts/interactions/conversationInteractions.ts index 5f0265292..ab483c60d 100644 --- a/ts/interactions/conversationInteractions.ts +++ b/ts/interactions/conversationInteractions.ts @@ -91,7 +91,7 @@ export async function unblockConvoById(conversationId: string) { export const approveConvoAndSendResponse = async (conversationId: string) => { const convoToApprove = getConversationController().get(conversationId); - if (!convoToApprove) { + if (!convoToApprove || convoToApprove.isApproved()) { window?.log?.info('Conversation is already approved.'); return; } diff --git a/ts/session/utils/calling/CallManager.ts b/ts/session/utils/calling/CallManager.ts index 862b40919..62fa76d2b 100644 --- a/ts/session/utils/calling/CallManager.ts +++ b/ts/session/utils/calling/CallManager.ts @@ -35,6 +35,7 @@ import { MessageSender } from '../../sending'; import { getIsRinging } from '../RingingManager'; import { getBlackSilenceMediaStream } from './Silence'; import { ed25519Str } from '../String'; +import { sleepFor } from '../Promise'; export type InputItem = { deviceId: string; label: string }; @@ -534,6 +535,10 @@ export async function USER_callRecipient(recipient: string) { calledConvo.set('active_at', Date.now()); // addSingleOutgoingMessage does the commit for us on the convo await calledConvo.unhideIfNeeded(false); weAreCallerOnCurrentCall = true; + // Not ideal, but also temporary (see you in 2 years). + // We need to make sure the preoffer AND the messageRequestResponse sent in + // approveConvoAndSendResponse have different timestamps, as iOS will throw an error otherwise + await sleepFor(2); // initiating a call is analogous to sending a message request await approveConvoAndSendResponse(recipient); From 953c0738f9200938e6284c1486a6334102885aa1 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 4 Dec 2024 10:23:06 +1100 Subject: [PATCH 2/9] chore: bump release 1.14.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 063968495..ea3e888e4 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "session-desktop", "productName": "Session", "description": "Private messaging from your desktop", - "version": "1.14.1", + "version": "1.14.3", "license": "GPL-3.0", "author": { "name": "Oxen Labs", From c508757eba4cf76ba9277ef13534dce911551414 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 4 Dec 2024 10:27:00 +1100 Subject: [PATCH 3/9] chore: use gh runner image macos-13 as macos-12 is deprecated, and sometimes hang for 1h doing nothing --' --- .github/workflows/build-binaries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 1d39adeae..d69055f05 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -118,7 +118,7 @@ jobs: # We want a mac arm64 build, and according to this https://github.com/actions/runner-images#available-images macos-14 is always arm64 # macos-14 is disabled for now as we hit our free tier limit for macos builds build_macos_x64: - runs-on: macos-12 + runs-on: macos-13 env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE }} From a9ff414fabe46e214acd67466b0c8712d7b75e16 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 4 Dec 2024 10:49:52 +1100 Subject: [PATCH 4/9] chore: change repository url to session-foundation --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ea3e888e4..6ddbd3d53 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/oxen-io/session-desktop.git" + "url": "https://github.com/session-foundation/session-desktop.git" }, "main": "ts/mains/main_node.js", "resolutions": { From 61eaf51f1a6315375c4c359ac6e6b19151a0d4cd Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 5 Dec 2024 14:12:24 +1100 Subject: [PATCH 5/9] chore: test with macos new certs --- .github/workflows/build-binaries.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 0f7b35dab..02739758b 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -121,10 +121,10 @@ jobs: runs-on: macos-13 env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE }} - MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }} - SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID }} - SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD }} + MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE_2 }} + MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD_2 }} + SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID_2 }} + SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD_2 }} SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }} steps: - run: git config --global core.autocrlf false From c595571ef49da51cdd912b4a7f2515884bf74d8c Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 5 Dec 2024 16:32:55 +1100 Subject: [PATCH 6/9] Revert "chore: test with macos new certs" This reverts commit 61eaf51f1a6315375c4c359ac6e6b19151a0d4cd. --- .github/workflows/build-binaries.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 02739758b..0f7b35dab 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -121,10 +121,10 @@ jobs: runs-on: macos-13 env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE_2 }} - MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD_2 }} - SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID_2 }} - SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD_2 }} + MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE }} + MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }} + SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID }} + SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD }} SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }} steps: - run: git config --global core.autocrlf false From 368106711f4f9e405894e2a8b90e3412ab11f450 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 5 Dec 2024 17:22:44 +1100 Subject: [PATCH 7/9] chore: try by removing node-gyp install on windows --- actions/setup_and_build/action.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/actions/setup_and_build/action.yml b/actions/setup_and_build/action.yml index 5c51a5146..67dae5f09 100644 --- a/actions/setup_and_build/action.yml +++ b/actions/setup_and_build/action.yml @@ -22,12 +22,6 @@ runs: uses: microsoft/setup-msbuild@v2 if: runner.os == 'Windows' - - name: Setup node for windows - if: runner.os == 'Windows' - shell: bash - run: | - yarn global add node-gyp@latest - - uses: actions/cache/restore@v4 id: cache-desktop-modules with: From ea0d5e16151297f7c27a3a41e91ab0da4da39991 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 5 Dec 2024 17:34:38 +1100 Subject: [PATCH 8/9] chore: happy to say node-gyp is not needed for windows anymore --- INTERNALBUILDS.md | 1 - 1 file changed, 1 deletion(-) diff --git a/INTERNALBUILDS.md b/INTERNALBUILDS.md index 8ab1b3db4..9858a0237 100644 --- a/INTERNALBUILDS.md +++ b/INTERNALBUILDS.md @@ -80,7 +80,6 @@ Building on windows should work straight out of the box, but if it fails then yo ``` npm install --global --production windows-build-tools@4.0.0 -npm install --global node-gyp@latest npm config set python python2.7 npm config set msvs_version 2015 ``` From 7c180d4078228f2895fc66ad7a3afdfde5049b26 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Fri, 6 Dec 2024 09:03:10 +1100 Subject: [PATCH 9/9] chore: workflow: do not fail fast --- .github/workflows/build-binaries.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 0f7b35dab..83dd6a348 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -31,6 +31,7 @@ jobs: build_linux: runs-on: ubuntu-20.04 strategy: + fail-fast: false matrix: # this needs to be a valid target of https://www.electron.build/linux#target pkg_to_build: ['deb', 'rpm', 'freebsd', 'AppImage']