feat: fetch latest changes from oxen-io repo

pull/3281/head
Audric Ackermann 4 months ago
parent 3cadc54e44
commit 735ab914d1
No known key found for this signature in database

@ -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']
@ -118,7 +119,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 }}

@ -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
```

@ -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:

@ -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",
@ -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": {

@ -61,7 +61,6 @@ export function OpenUrlModal(props: OpenUrlModalState) {
/>
<SessionButton
text={window.i18n('urlCopy')}
buttonColor={SessionButtonColor.White}
buttonType={SessionButtonType.Simple}
onClick={onClickCopy}
dataTestId="session-confirm-cancel-button"

@ -1,9 +1,11 @@
import { ipcRenderer } from 'electron';
import { debounce } from 'lodash';
import { useEffect, useRef, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import useInterval from 'react-use/lib/useInterval';
import useTimeoutFn from 'react-use/lib/useTimeoutFn';
import useThrottleFn from 'react-use/lib/useThrottleFn';
import { Data } from '../../data/data';
import { getConversationController } from '../../session/conversations';
@ -37,18 +39,18 @@ import { LeftPaneSectionContainer } from './LeftPaneSectionContainer';
import { SettingsKey } from '../../data/settings-key';
import { useFetchLatestReleaseFromFileServer } from '../../hooks/useFetchLatestReleaseFromFileServer';
import { useHotkey } from '../../hooks/useHotkey';
import {
forceRefreshRandomSnodePool,
getFreshSwarmFor,
} from '../../session/apis/snode_api/snodePool';
import { ConfigurationSync } from '../../session/utils/job_runners/jobs/ConfigurationSyncJob';
import { getIsModalVisble } from '../../state/selectors/modal';
import { useIsDarkTheme } from '../../state/selectors/theme';
import { switchThemeTo } from '../../themes/switchTheme';
import { ReleasedFeatures } from '../../util/releaseFeature';
import { getOppositeTheme } from '../../util/theme';
import { SessionNotificationCount } from '../icon/SessionNotificationCount';
import { useHotkey } from '../../hooks/useHotkey';
import { getIsModalVisble } from '../../state/selectors/modal';
const Section = (props: { type: SectionType }) => {
const ourNumber = useSelector(getOurNumber);
@ -238,6 +240,19 @@ export const ActionsPanel = () => {
return () => clearTimeout(timeout);
}, []);
const globalUnreadMessageCount = useSelector(getGlobalUnreadMessageCount);
// Reuse the unreadToShow from the global state to update the badge count
useThrottleFn(
(unreadCount: number) => {
if (globalUnreadMessageCount !== undefined) {
ipcRenderer.send('update-badge-count', unreadCount);
}
},
2000,
[globalUnreadMessageCount]
);
useInterval(cleanUpOldDecryptedMedias, startCleanUpMedia ? cleanUpMediasInterval : null);
useFetchLatestReleaseFromFileServer();

@ -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;
}

@ -10,6 +10,7 @@ import {
dialog,
protocol as electronProtocol,
ipcMain as ipc,
ipcMain,
IpcMainEvent,
Menu,
nativeTheme,
@ -27,7 +28,7 @@ import { platform as osPlatform } from 'process';
import url from 'url';
import Logger from 'bunyan';
import _, { isEmpty } from 'lodash';
import _, { isEmpty, isNumber, isFinite } from 'lodash';
import pify from 'pify';
import { setupGlobalErrorHandler } from '../node/global_errors'; // checked - only node
@ -1019,6 +1020,12 @@ ipc.on('get-start-in-tray', event => {
}
});
ipcMain.on('update-badge-count', (_event, count) => {
if (app.isReady()) {
app.setBadgeCount(isNumber(count) && isFinite(count) && count >= 0 ? count : 0);
}
});
ipc.on('get-opengroup-pruning', event => {
try {
const val = userConfig.get('opengroupPruning');

@ -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);

Loading…
Cancel
Save