From 89aba76f7564715c482340f0eb520c59a6d13085 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 4 Dec 2024 09:56:57 +1100 Subject: [PATCH 1/4] 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 5f02652920..ab483c60da 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 862b40919c..62fa76d2b2 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 a0f2f9dd509399943921212b78e720c41cf130aa Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 4 Dec 2024 10:23:06 +1100 Subject: [PATCH 2/4] 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 d5b0f2cd63..ea3e888e44 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.2", + "version": "1.14.3", "license": "GPL-3.0", "author": { "name": "Oxen Labs", From dc846573badc6aaf53167fe3f6a0385da30ba5e2 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 4 Dec 2024 10:27:00 +1100 Subject: [PATCH 3/4] 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 507e011783..0f7b35dab0 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 d09a8aaf4c8b88edbadde9d3d7103f10fabae19b Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 4 Dec 2024 10:33:06 +1100 Subject: [PATCH 4/4] chore: replace 'clearnet' with 'unstable' --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/build-binaries.yml | 2 -- CONTRIBUTING.md | 4 ++-- THEMES.md | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2e219d7354..d957f6f4da 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -14,7 +14,7 @@ Remember, you can preview this before saving it. ### Contributor checklist: - [ ] My commits are in nice logical chunks with [good commit messages](http://chris.beams.io/posts/git-commit/) -- [ ] My changes are [rebased](https://blog.axosoft.com/golden-rule-of-rebasing-in-git/) on the latest [`clearnet`](https://github.com/oxen-io/session-desktop/tree/clearnet) branch +- [ ] My changes are [rebased](https://blog.axosoft.com/golden-rule-of-rebasing-in-git/) on the latest [`unstable`](https://github.com/oxen-io/session-desktop/tree/unstable) branch - [ ] A `yarn ready` run passes successfully ([more about tests here](https://github.com/oxen-io/session-desktop/blob/master/CONTRIBUTING.md#tests)) - [ ] My changes are ready to be shipped to users diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 0f7b35dab0..020b37bf0a 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -8,13 +8,11 @@ on: push: branches: - master - - clearnet - unstable - 'release/**' - 'ci/**' pull_request: branches: - - clearnet - unstable - 'release/**' - 'ci/**' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fc2c480492..c4891a3b8c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -239,10 +239,10 @@ So you wanna make a pull request? Please observe the following guidelines. - Please do not submit pull requests for pure translation fixes. Anyone can update the translations at [Crowdin](https://getsession.org/translate). - [Rebase](https://nathanleclaire.com/blog/2014/09/14/dont-be-scared-of-git-rebase/) your - changes on the latest `clearnet` branch, resolving any conflicts. + changes on the latest `unstable` branch, resolving any conflicts. This ensures that your changes will merge cleanly when you open your PR. - Be sure to add and run tests! -- Make sure the diff between `clearnet` and your branch contains only the +- Make sure the diff between `unstable` and your branch contains only the minimal set of changes needed to implement your feature or bugfix. This will make it easier for the person reviewing your code to approve the changes. Please do not submit a PR with commented out code or unfinished features. diff --git a/THEMES.md b/THEMES.md index 37a98dfc24..86e82a95cb 100644 --- a/THEMES.md +++ b/THEMES.md @@ -23,7 +23,7 @@ Session doesn't support custom theming yet but it's pretty easy to add a new the [Here](https://github.com/yougotwill/session-desktop/pull/19) is an example PR for the `Windows Crash` theme which was inspired by the classic [blue screen of death](https://user-images.githubusercontent.com/14887287/203880658-e4a768d7-1b25-45d2-9e6d-00b233eb84a8.png). -Keep in mind that if you swap back to the latest `clearnet` with the `Windows Crash` theme set it may cause a database issue. So when you change your branch back make sure to set your theme to one of the [available themes](#available-themes) above. +Keep in mind that if you swap back to the latest `unstable` with the `Windows Crash` theme set it may cause a database issue. So when you change your branch back make sure to set your theme to one of the [available themes](#available-themes) above. ### Screenshot