Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/unstable' into closed-group-ch…
Browse files Browse the repository at this point in the history
…unk3
  • Loading branch information
Bilb committed May 27, 2024
2 parents 6f7e576 + 71436ea commit 6e137fe
Show file tree
Hide file tree
Showing 159 changed files with 2,926 additions and 2,736 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ Build instructions can be found in [Contributing.md](CONTRIBUTING.md).

## Verifying signatures


Get Kee's key and import it:

```
wget https://raw.githubusercontent.com/oxen-io/oxen-core/dev/utils/gpg_keys/KeeJef.asc
gpg --import KeeJef.asc
```

Get the signed hash for this release, the SESSION_VERSION needs to be updated for the release you want to verify

```
export SESSION_VERSION=1.6.1
wget https://github.com/oxen-io/session-desktop/releases/download/v$SESSION_VERSION/signatures.asc
Expand All @@ -46,12 +47,12 @@ If it does, the hashes are valid but we still have to make the sure the signed h

Make sure the two commands below returns the same hash.
If they do, files are valid

```
sha256sum session-desktop-linux-amd64-$SESSION_VERSION.deb
grep .deb signatures.asc
```


## Debian repository

Please visit https://deb.oxen.io/<br/>
Expand All @@ -62,3 +63,7 @@ Copyright 2011 Whisper Systems<br/>
Copyright 2013-2017 Open Whisper Systems<br/>
Copyright 2019-2023 The Oxen Project<br/>
Licensed under the GPLv3: https://www.gnu.org/licenses/gpl-3.0.html<br/>

## Attributions

The IP-to-country mapping data used in this project is provided by [MaxMind GeoLite2](https://dev.maxmind.com/geoip/geolite2-free-geolocation-data).
3 changes: 2 additions & 1 deletion _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -617,5 +617,6 @@
"resolution": "Resolution",
"duration": "Duration",
"notApplicable": "N/A",
"unknownError": "Unknown Error"
"unknownError": "Unknown Error",
"displayNameErrorNew": "We were unable to load your display name. Please enter a new display name to continue."
}
2 changes: 2 additions & 0 deletions build/entitlements.mac.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<!-- Mac distribution -->
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.device.audio-input</key>
Expand Down
4 changes: 4 additions & 0 deletions build/entitlements.mas.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!-- Mac app store -->
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
Expand Down
2 changes: 1 addition & 1 deletion build/notarize.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports.default = async function notarizing(context) {
}

const options = {
appBundleId: 'org.getsession.desktop',
appBundleId: 'com.loki-project.messenger-desktop',
appPath: `${appOutDir}/${appName}.app`,
appleId: SIGNING_APPLE_ID,
appleIdPassword: SIGNING_APP_PASSWORD,
Expand Down
Binary file added mmdb/GeoLite2-Country.mmdb
Binary file not shown.
25 changes: 14 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "session-desktop",
"productName": "Session",
"description": "Private messaging from your desktop",
"version": "1.12.0",
"version": "1.12.3",
"license": "GPL-3.0",
"author": {
"name": "Oxen Labs",
Expand Down Expand Up @@ -78,13 +78,12 @@
"auto-bind": "^4.0.0",
"backbone": "1.3.3",
"blob-util": "2.0.2",
"blueimp-load-image": "5.14.0",
"blueimp-load-image": "^5.16.0",
"buffer-crc32": "0.2.13",
"bunyan": "https://github.com/Bilb/node-bunyan",
"bytebuffer": "^5.0.1",
"classnames": "2.2.5",
"config": "1.28.1",
"country-code-lookup": "^0.0.19",
"curve25519-js": "https://github.com/oxen-io/curve25519-js",
"date-fns": "^3.3.1",
"dompurify": "^2.0.7",
Expand All @@ -93,15 +92,16 @@
"emoji-mart": "^5.5.2",
"filesize": "3.6.1",
"firstline": "1.2.1",
"focus-trap-react": "^10.2.3",
"fs-extra": "9.0.0",
"glob": "10.3.10",
"image-type": "^4.1.0",
"ip2country": "1.0.1",
"libsession_util_nodejs": "https://github.com/oxen-io/libsession-util-nodejs/releases/download/v0.4.3/libsession_util_nodejs-v0.4.3.tar.gz",
"libsodium-wrappers-sumo": "^0.7.9",
"linkify-it": "^4.0.1",
"lodash": "^4.17.21",
"long": "^4.0.0",
"maxmind": "^4.3.18",
"mic-recorder-to-mp3": "^2.2.2",
"moment": "^2.29.4",
"node-fetch": "^2.6.7",
Expand Down Expand Up @@ -140,7 +140,7 @@
"@commitlint/types": "^17.4.4",
"@electron/notarize": "^2.1.0",
"@types/backbone": "1.4.2",
"@types/blueimp-load-image": "5.14.4",
"@types/blueimp-load-image": "^5.16.2",
"@types/buffer-crc32": "^0.2.0",
"@types/bunyan": "^1.8.8",
"@types/bytebuffer": "^5.0.41",
Expand All @@ -166,7 +166,7 @@
"@types/rimraf": "2.0.2",
"@types/semver": "5.5.0",
"@types/sinon": "9.0.4",
"@types/styled-components": "^5.1.4",
"@types/styled-components": "5.1.1",
"@types/uuid": "8.3.4",
"@typescript-eslint/eslint-plugin": "7.1.0",
"@typescript-eslint/parser": "7.1.0",
Expand All @@ -176,7 +176,7 @@
"cross-env": "^6.0.3",
"css-loader": "^6.7.2",
"dmg-builder": "23.6.0",
"electron": "^25.8.4",
"electron": "25.8.4",
"electron-builder": "23.0.8",
"eslint": "8.57.0",
"eslint-config-airbnb-base": "^15.0.0",
Expand Down Expand Up @@ -216,10 +216,13 @@
"afterSign": "build/notarize.js",
"afterPack": "build/afterPackHook.js",
"artifactName": "${name}-${os}-${arch}-${version}.${ext}",
"extraResources": {
"from": "./build/launcher-script.sh",
"to": "./launcher-script.sh"
},
"extraResources": [
{
"from": "./build/launcher-script.sh",
"to": "./launcher-script.sh"
},
"mmdb/GeoLite2-Country.mmdb"
],
"mac": {
"category": "public.app-category.social-networking",
"icon": "build/icon-mac.icns",
Expand Down
2 changes: 1 addition & 1 deletion preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ window.getNodeVersion = () => configAny.node_version;

window.sessionFeatureFlags = {
useOnionRequests: true,
useTestNet: isTestNet(),
useTestNet: isTestNet() || isTestIntegration(),
useClosedGroupV2: true, // TODO DO NOT MERGE Remove after QA debugger
debug: {
debugLogging: !_.isEmpty(process.env.SESSION_DEBUG),
Expand Down
1 change: 0 additions & 1 deletion stylesheets/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@
display: flex;
align-items: center;
justify-content: center;
margin-right: -20px; // offsets the edit icon button so it's centered

p {
font-size: $session-font-md;
Expand Down
8 changes: 5 additions & 3 deletions stylesheets/_modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
display: flex;
flex-direction: row;
align-items: center;
cursor: pointer;
padding: 10px;
border-radius: var(--border-radius-message-box);

Expand All @@ -73,7 +74,6 @@

.module-message__generic-attachment__icon-container {
position: relative;
cursor: pointer;
}
.module-message__generic-attachment__spinner-container {
padding-inline-start: 4px;
Expand Down Expand Up @@ -255,8 +255,6 @@

.module-conversation__user,
.module-message__author {
margin-top: var(--margins-sm);
margin-bottom: var(--margins-xs);
font-size: var(--font-size-sm);
font-weight: 300;
line-height: 18px;
Expand Down Expand Up @@ -611,6 +609,9 @@
flex-direction: column;
align-items: stretch;
overflow: hidden;
max-height: 100%;
display: flex;
gap: 5px;

.session-icon-button:first-child {
margin-right: var(--margins-sm);
Expand All @@ -621,6 +622,7 @@
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: var(--margins-xs);
}

.module-conversation-list-item__header__name {
Expand Down
1 change: 0 additions & 1 deletion stylesheets/_session_constants.scss
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ $session-margin-md: 15px;
$session-margin-lg: 20px;

// Animations
$session-transition-duration: 0.25s;

@keyframes fadein {
from {
Expand Down
4 changes: 2 additions & 2 deletions stylesheets/_session_slider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@
}
.rc-slider-tooltip-zoom-down-enter,
.rc-slider-tooltip-zoom-down-appear {
animation-duration: 0.3s;
animation-duration: var(--default-duration);
animation-fill-mode: both;
display: block !important;
animation-play-state: paused;
}
.rc-slider-tooltip-zoom-down-leave {
animation-duration: 0.3s;
animation-duration: var(--default-duration);
animation-fill-mode: both;
display: block !important;
animation-play-state: paused;
Expand Down
4 changes: 2 additions & 2 deletions ts/components/DebugLogView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
import styled from 'styled-components';
import { switchThemeTo } from '../themes/switchTheme';
import { SessionTheme } from '../themes/SessionTheme';
import { fetch } from '../util/logging';
import { fetchNodeLog } from '../util/logging';
import { SessionButton, SessionButtonType } from './basic/SessionButton';
import { SessionIconButton } from './icon';

Expand Down Expand Up @@ -78,7 +78,7 @@ const DebugLogViewAndSave = () => {
const commitHashInfo = window.getCommitHash() ? `Commit Hash: ${window.getCommitHash()}` : '';

// eslint-disable-next-line more/no-then
fetch()
fetchNodeLog()
.then((text: any) => {
const debugLogWithSystemInfo = `${operatingSystemInfo} ${commitHashInfo} ${text}`;
setContent(debugLogWithSystemInfo);
Expand Down
21 changes: 21 additions & 0 deletions ts/components/SessionFocusTrap.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import FocusTrap from 'focus-trap-react';
import React, { useState } from 'react';
import { useMount } from 'react-use';

/**
* Focus trap which activates on mount.
*/
export function SessionFocusTrap(props: { children: React.ReactNode }) {
const [active, setActive] = useState(false);

// Activate the trap on mount so we **should** have a button to tab through. focus-trap-react will throw if we don't have a button when the trap becomes active.
// We might still have an issue for dialogs which have buttons added with a useEffect, or asynchronously but have no buttons on mount.
// If that happens we will need to force those dialogs to have at least one button so focus-trap-react does not throw.
useMount(() => setActive(true));

return (
<FocusTrap active={active} focusTrapOptions={{ initialFocus: false, allowOutsideClick: true }}>
{props.children}
</FocusTrap>
);
}
16 changes: 14 additions & 2 deletions ts/components/SessionInboxView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,20 @@ async function createSessionInboxStore() {

async function setupLeftPane(forceUpdateInboxComponent: () => void) {
window.openConversationWithMessages = openConversationWithMessages;

window.inboxStore = await createSessionInboxStore();
window.inboxStore.dispatch(updateAllOnStorageReady());

window.inboxStore.dispatch(
updateAllOnStorageReady({
hasBlindedMsgRequestsEnabled: Storage.getBoolOrFalse(
SettingsKey.hasBlindedMsgRequestsEnabled
),
someDeviceOutdatedSyncing: Storage.getBoolOrFalse(SettingsKey.someDeviceOutdatedSyncing),
settingsLinkPreview: Storage.getBoolOrFalse(SettingsKey.settingsLinkPreview),
hasFollowSystemThemeEnabled: Storage.getBoolOrFalse(SettingsKey.hasFollowSystemThemeEnabled),
hasShiftSendEnabled: Storage.getBoolOrFalse(SettingsKey.hasShiftSendEnabled),
})
);
window.inboxStore.dispatch(groupInfoActions.loadMetaDumpsFromDB()); // this loads the dumps from DB and fills the 03-groups slice with the corresponding details
forceUpdateInboxComponent();
window.getState = window.inboxStore.getState;
Expand All @@ -122,7 +134,7 @@ const SomeDeviceOutdatedSyncingNotice = () => {
text={window.i18n('someOfYourDeviceUseOutdatedVersion')}
onButtonClick={dismiss}
icon="exit"
dataTestId='some-of-your-devices-outdated-inbox'
dataTestId="some-of-your-devices-outdated-inbox"
/>
);
};
Expand Down
10 changes: 7 additions & 3 deletions ts/components/SessionScrollButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { useSelector } from 'react-redux';
import styled from 'styled-components';
import { getShowScrollButton } from '../state/selectors/conversations';

import { useSelectedUnreadCount } from '../state/selectors/selectedConversation';
import { SessionIconButton } from './icon';
import { Noop } from '../types/Util';
import { SessionUnreadCount } from './icon/SessionNotificationCount';

const SessionScrollButtonDiv = styled.div`
position: fixed;
Expand All @@ -18,8 +19,9 @@ const SessionScrollButtonDiv = styled.div`
}
`;

export const SessionScrollButton = (props: { onClickScrollBottom: Noop }) => {
export const SessionScrollButton = (props: { onClickScrollBottom: () => void }) => {
const show = useSelector(getShowScrollButton);
const unreadCount = useSelectedUnreadCount();

return (
<SessionScrollButtonDiv>
Expand All @@ -29,7 +31,9 @@ export const SessionScrollButton = (props: { onClickScrollBottom: Noop }) => {
isHidden={!show}
onClick={props.onClickScrollBottom}
dataTestId="scroll-to-bottom-button"
/>
>
{Boolean(unreadCount) && <SessionUnreadCount count={unreadCount} />}
</SessionIconButton>
</SessionScrollButtonDiv>
);
};
Loading

0 comments on commit 6e137fe

Please sign in to comment.