Skip to content

Commit 735ab91

Browse files
committed
feat: fetch latest changes from oxen-io repo
1 parent 3cadc54 commit 735ab91

File tree

9 files changed

+35
-15
lines changed

9 files changed

+35
-15
lines changed

.github/workflows/build-binaries.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
build_linux:
3232
runs-on: ubuntu-20.04
3333
strategy:
34+
fail-fast: false
3435
matrix:
3536
# this needs to be a valid target of https://www.electron.build/linux#target
3637
pkg_to_build: ['deb', 'rpm', 'freebsd', 'AppImage']
@@ -118,7 +119,7 @@ jobs:
118119
# We want a mac arm64 build, and according to this https://github.com/actions/runner-images#available-images macos-14 is always arm64
119120
# macos-14 is disabled for now as we hit our free tier limit for macos builds
120121
build_macos_x64:
121-
runs-on: macos-12
122+
runs-on: macos-13
122123
env:
123124
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124125
MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE }}

INTERNALBUILDS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ Building on windows should work straight out of the box, but if it fails then yo
8080

8181
```
8282
npm install --global --production [email protected]
83-
npm install --global node-gyp@latest
8483
npm config set python python2.7
8584
npm config set msvs_version 2015
8685
```

actions/setup_and_build/action.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ runs:
2222
uses: microsoft/setup-msbuild@v2
2323
if: runner.os == 'Windows'
2424

25-
- name: Setup node for windows
26-
if: runner.os == 'Windows'
27-
shell: bash
28-
run: |
29-
yarn global add node-gyp@latest
30-
3125
- uses: actions/cache/restore@v4
3226
id: cache-desktop-modules
3327
with:

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"name": "session-desktop",
33
"productName": "Session",
44
"description": "Private messaging from your desktop",
5-
"version": "1.14.2",
5+
"version": "1.14.3",
66
"license": "GPL-3.0",
77
"author": {
88
"name": "Oxen Labs",
99
"email": "[email protected]"
1010
},
1111
"repository": {
1212
"type": "git",
13-
"url": "https://github.com/oxen-io/session-desktop.git"
13+
"url": "https://github.com/session-foundation/session-desktop.git"
1414
},
1515
"main": "ts/mains/main_node.js",
1616
"resolutions": {

ts/components/dialog/OpenUrlModal.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export function OpenUrlModal(props: OpenUrlModalState) {
6161
/>
6262
<SessionButton
6363
text={window.i18n('urlCopy')}
64-
buttonColor={SessionButtonColor.White}
6564
buttonType={SessionButtonType.Simple}
6665
onClick={onClickCopy}
6766
dataTestId="session-confirm-cancel-button"

ts/components/leftpane/ActionsPanel.tsx

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
import { ipcRenderer } from 'electron';
12
import { debounce } from 'lodash';
23
import { useEffect, useRef, useState } from 'react';
34

45
import { useDispatch, useSelector } from 'react-redux';
56
import useInterval from 'react-use/lib/useInterval';
67
import useTimeoutFn from 'react-use/lib/useTimeoutFn';
8+
import useThrottleFn from 'react-use/lib/useThrottleFn';
79

810
import { Data } from '../../data/data';
911
import { getConversationController } from '../../session/conversations';
@@ -37,18 +39,18 @@ import { LeftPaneSectionContainer } from './LeftPaneSectionContainer';
3739

3840
import { SettingsKey } from '../../data/settings-key';
3941
import { useFetchLatestReleaseFromFileServer } from '../../hooks/useFetchLatestReleaseFromFileServer';
42+
import { useHotkey } from '../../hooks/useHotkey';
4043
import {
4144
forceRefreshRandomSnodePool,
4245
getFreshSwarmFor,
4346
} from '../../session/apis/snode_api/snodePool';
4447
import { ConfigurationSync } from '../../session/utils/job_runners/jobs/ConfigurationSyncJob';
48+
import { getIsModalVisble } from '../../state/selectors/modal';
4549
import { useIsDarkTheme } from '../../state/selectors/theme';
4650
import { switchThemeTo } from '../../themes/switchTheme';
4751
import { ReleasedFeatures } from '../../util/releaseFeature';
4852
import { getOppositeTheme } from '../../util/theme';
4953
import { SessionNotificationCount } from '../icon/SessionNotificationCount';
50-
import { useHotkey } from '../../hooks/useHotkey';
51-
import { getIsModalVisble } from '../../state/selectors/modal';
5254

5355
const Section = (props: { type: SectionType }) => {
5456
const ourNumber = useSelector(getOurNumber);
@@ -238,6 +240,19 @@ export const ActionsPanel = () => {
238240
return () => clearTimeout(timeout);
239241
}, []);
240242

243+
const globalUnreadMessageCount = useSelector(getGlobalUnreadMessageCount);
244+
245+
// Reuse the unreadToShow from the global state to update the badge count
246+
useThrottleFn(
247+
(unreadCount: number) => {
248+
if (globalUnreadMessageCount !== undefined) {
249+
ipcRenderer.send('update-badge-count', unreadCount);
250+
}
251+
},
252+
2000,
253+
[globalUnreadMessageCount]
254+
);
255+
241256
useInterval(cleanUpOldDecryptedMedias, startCleanUpMedia ? cleanUpMediasInterval : null);
242257

243258
useFetchLatestReleaseFromFileServer();

ts/interactions/conversationInteractions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export async function unblockConvoById(conversationId: string) {
9191
export const approveConvoAndSendResponse = async (conversationId: string) => {
9292
const convoToApprove = getConversationController().get(conversationId);
9393

94-
if (!convoToApprove) {
94+
if (!convoToApprove || convoToApprove.isApproved()) {
9595
window?.log?.info('Conversation is already approved.');
9696
return;
9797
}

ts/mains/main_node.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
dialog,
1111
protocol as electronProtocol,
1212
ipcMain as ipc,
13+
ipcMain,
1314
IpcMainEvent,
1415
Menu,
1516
nativeTheme,
@@ -27,7 +28,7 @@ import { platform as osPlatform } from 'process';
2728
import url from 'url';
2829

2930
import Logger from 'bunyan';
30-
import _, { isEmpty } from 'lodash';
31+
import _, { isEmpty, isNumber, isFinite } from 'lodash';
3132
import pify from 'pify';
3233

3334
import { setupGlobalErrorHandler } from '../node/global_errors'; // checked - only node
@@ -1019,6 +1020,12 @@ ipc.on('get-start-in-tray', event => {
10191020
}
10201021
});
10211022

1023+
ipcMain.on('update-badge-count', (_event, count) => {
1024+
if (app.isReady()) {
1025+
app.setBadgeCount(isNumber(count) && isFinite(count) && count >= 0 ? count : 0);
1026+
}
1027+
});
1028+
10221029
ipc.on('get-opengroup-pruning', event => {
10231030
try {
10241031
const val = userConfig.get('opengroupPruning');

ts/session/utils/calling/CallManager.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import { MessageSender } from '../../sending';
3535
import { getIsRinging } from '../RingingManager';
3636
import { getBlackSilenceMediaStream } from './Silence';
3737
import { ed25519Str } from '../String';
38+
import { sleepFor } from '../Promise';
3839

3940
export type InputItem = { deviceId: string; label: string };
4041

@@ -534,6 +535,10 @@ export async function USER_callRecipient(recipient: string) {
534535
calledConvo.set('active_at', Date.now()); // addSingleOutgoingMessage does the commit for us on the convo
535536
await calledConvo.unhideIfNeeded(false);
536537
weAreCallerOnCurrentCall = true;
538+
// Not ideal, but also temporary (see you in 2 years).
539+
// We need to make sure the preoffer AND the messageRequestResponse sent in
540+
// approveConvoAndSendResponse have different timestamps, as iOS will throw an error otherwise
541+
await sleepFor(2);
537542

538543
// initiating a call is analogous to sending a message request
539544
await approveConvoAndSendResponse(recipient);

0 commit comments

Comments
 (0)