diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml
index eee42ea98..00b94bb00 100644
--- a/.github/workflows/build-binaries.yml
+++ b/.github/workflows/build-binaries.yml
@@ -61,7 +61,7 @@ jobs:
run: yarn install --frozen-lockfile --network-timeout 600000 --force
- name: Generate and concat files
- run: yarn generate && yarn transpile
+ run: yarn build-everything
- name: Lint Files
# no need to lint files on all platforms. Just do it once on the quicker one
diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml
index fa763ad49..0e6fdaf70 100644
--- a/.github/workflows/pull-request.yml
+++ b/.github/workflows/pull-request.yml
@@ -58,7 +58,7 @@ jobs:
run: yarn install --frozen-lockfile --network-timeout 600000 --force
- name: Generate and concat files
- run: yarn generate && yarn transpile
+ run: yarn build-everything
- name: Lint Files
# no need to lint files on all platforms. Just do it once on the quicker one
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 6dce17aa9..09a32491a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -58,7 +58,7 @@ jobs:
run: yarn install --frozen-lockfile --network-timeout 600000 --force
- name: Generate and concat files
- run: yarn generate && yarn transpile
+ run: yarn build-everything
- name: Lint Files
# no need to lint files on all platforms. Just do it once on the quicker one
diff --git a/BUILDING.md b/BUILDING.md
index 6a8359d57..d4bfd9a47 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -66,7 +66,7 @@ nvm install # install the current node version used in this project
nvm use # use the current node version used in this project
npm install -g yarn # install yarn globally for this node version
yarn install --frozen-lockfile # install all dependecies of this project
-yarn grunt # transpile and assemble files
+yarn build-everything # transpile and assemble files
yarn start-prod # start the app on production mode (currently this is the only one supported)
```
@@ -116,7 +116,7 @@ nvm install # install the current node version used in this project
nvm use # use the current node version used in this project
npm install -g yarn # install yarn globally for this node version
yarn install --frozen-lockfile # install all dependecies of this project
-yarn grunt # transpile and assemble files
+yarn build-everything # transpile and assemble files
yarn start-prod # start the app on production mode (currently this is the only one supported)
```
@@ -125,20 +125,21 @@ yarn start-prod # start the app on production mode (currently this is the only o
### Commands
The `rpm` package is required for running the build-release script. Run the appropriate command to install the `rpm` package:
+
```sh
sudo pacman -S rpm # Arch
```
+
```sh
sudo apt install rpm # Ubuntu/Debian
```
-
Run the following to build the binaries for your specific system OS.
```
npm install yarn --no-save
yarn install --frozen-lockfile
-yarn generate
+yarn build-everything
yarn build-release
```
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 94d3a1055..14ec868d0 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -60,10 +60,9 @@ git clone https://github.com/oxen-io/session-desktop.git
cd session-desktop
npm install --global yarn # (only if you don’t already have `yarn`)
yarn install --frozen-lockfile # Install and build dependencies (this will take a while)
-yarn grunt # Generate final JS and CSS assets
-yarn icon-gen # Generate full set of icons for Electron
+yarn build-everything
yarn test # A good idea to make sure tests run first
-yarn start # Start Session!
+yarn start-prod # Start Session!
```
You'll need to restart the application regularly to see your changes, as there
@@ -72,14 +71,10 @@ is no automatic restart mechanism. Alternatively, keep the developer tools open
Cmd + R (macOS) or Ctrl + R
(Windows & Linux).
-Also, note that the assets loaded by the application are not necessarily the same files
-you’re touching. You may not see your changes until you run `yarn grunt` on the
-command-line like you did during setup. You can make it easier on yourself by generating
-the latest built assets when you change a file. Run this in its own terminal instance
-while you make changes:
-
```
-yarn grunt dev # runs until you stop it, re-generating built assets on file changes
+yarn build-everything:watch # runs until you stop it, re-generating built assets on file changes
+# Once this command is waiting for changes, you will need to run in another terminal `yarn parcel-util-worker` to fix the "exports undefined" error on start.
+# If you do change the sass while this command is running, it won't pick it up. You need to either run `yarn sass` or have `yarn sass:watch` running in a separate terminal.
```
## Multiple instances
@@ -93,8 +88,6 @@ directory from `%appData%/Session` to `%appData%/Session-{environment}-{instance
There are a few scripts which you can use:
```
-yarn start - Start development
-MULTI=1 yarn start - Start second instance of development
yarn start-prod - Start production but in development mode
MULTI=1 yarn start-prod - Start another instance of production
```
@@ -103,7 +96,7 @@ For more than 2 clients, you may run the above command with `NODE_APP_INSTANCE`
For example, running:
```
-NODE_APP_INSTANCE=alice yarn start
+NODE_APP_INSTANCE=alice yarn start-prod
```
Will run the development environment with the `alice` instance and thus create a seperate storage profile.
@@ -188,6 +181,6 @@ see how they did things.
You can build a production binary by running the following:
```
-yarn generate
+yarn build-everything
yarn build-release
```
diff --git a/Gruntfile.js b/Gruntfile.js
index a853ac101..c92975922 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -3,14 +3,6 @@
module.exports = grunt => {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
- exec: {
- transpile: {
- cmd: 'yarn transpile',
- },
- 'build-protobuf': {
- cmd: 'yarn build-protobuf',
- },
- },
gitinfo: {}, // to be populated by grunt gitinfo
});
@@ -45,5 +37,5 @@ module.exports = grunt => {
});
grunt.registerTask('date', ['gitinfo']);
- grunt.registerTask('default', ['exec:build-protobuf', 'exec:transpile', 'date', 'getCommitHash']);
+ grunt.registerTask('default', ['date', 'getCommitHash']);
};
diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index 31e63b88f..c301eb74a 100644
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -254,8 +254,8 @@
"cannotRemoveCreatorFromGroup": "Cannot remove this user",
"cannotRemoveCreatorFromGroupDesc": "You cannot remove this user as they are the creator of the group.",
"noContactsForGroup": "You don't have any contacts yet",
- "failedToAddAsModerator": "Failed to add user as moderator",
- "failedToRemoveFromModerator": "Failed to remove user from the moderator list",
+ "failedToAddAsModerator": "Failed to add user as admin",
+ "failedToRemoveFromModerator": "Failed to remove user from the admin list",
"copyMessage": "Copy message text",
"selectMessage": "Select message",
"editGroup": "Edit group",
@@ -311,15 +311,15 @@
"editProfileModalTitle": "Profile",
"groupNamePlaceholder": "Group Name",
"inviteContacts": "Invite Contacts",
- "addModerators": "Add Moderators",
- "removeModerators": "Remove Moderators",
- "addAsModerator": "Add as Moderator",
- "removeFromModerators": "Remove From Moderators",
+ "addModerators": "Add Admins",
+ "removeModerators": "Remove Admins",
+ "addAsModerator": "Add as Admin",
+ "removeFromModerators": "Remove From Admins",
"add": "Add",
"addingContacts": "Adding contacts to $name$",
"noContactsToAdd": "No contacts to add",
"noMembersInThisGroup": "No other members in this group",
- "noModeratorsToRemove": "no moderators to remove",
+ "noModeratorsToRemove": "no admins to remove",
"onlyAdminCanRemoveMembers": "You are not the creator",
"onlyAdminCanRemoveMembersDesc": "Only the creator of the group can remove users",
"createAccount": "Create account",
@@ -369,8 +369,8 @@
"pickClosedGroupMember": "Please pick at least 1 group member",
"closedGroupMaxSize": "A closed group cannot have more than 100 members",
"noBlockedContacts": "No blocked contacts",
- "userAddedToModerators": "User added to moderator list",
- "userRemovedFromModerators": "User removed from moderator list",
+ "userAddedToModerators": "User added to admin list",
+ "userRemovedFromModerators": "User removed from admin list",
"orJoinOneOfThese": "Or join one of these...",
"helpUsTranslateSession": "Translate Session",
"closedGroupInviteFailTitle": "Group Invitation Failed",
diff --git a/package.json b/package.json
index 13c55ee32..d61780aff 100644
--- a/package.json
+++ b/package.json
@@ -45,12 +45,27 @@
"jpeg-js": "^0.4.4"
},
"scripts": {
- "postinstall": "yarn patch-package && yarn electron-builder install-app-deps && yarn rebuild-curve25519-js",
"start-prod": "cross-env NODE_ENV=production NODE_APP_INSTANCE=devprod$MULTI electron .",
- "grunt": "yarn clean-transpile && yarn sass && grunt",
- "generate": "yarn grunt --force",
+
+ "build-everything": "yarn clean && yarn protobuf && grunt && yarn sass && tsc && yarn parcel-util-worker",
+ "build-everything:watch": "yarn clean && yarn protobuf && grunt && yarn sass && yarn parcel-util-worker && tsc -w",
+
+ "protobuf": "pbjs --target static-module --wrap commonjs --out ts/protobuf/compiled.js protos/*.proto && pbts --out ts/protobuf/compiled.d.ts ts/protobuf/compiled.js --force-long",
+ "sass": "rimraf 'stylesheets/dist/' && parcel build --target sass --no-autoinstall --no-cache",
+ "sass:watch": "rimraf 'stylesheets/dist/' && parcel watch --target sass --no-autoinstall --no-cache",
+ "parcel-util-worker": "rimraf ts/webworker/workers/util.worker.js && parcel build --target util-worker --no-autoinstall --no-cache",
+ "clean": "rimraf 'ts/**/*.js' 'ts/*.js' 'ts/*.js.map' 'ts/**/*.js.map' && rimraf tsconfig.tsbuildinfo;",
+
+ "lint-full": "yarn format-full && eslint . && tslint --format stylish --project .",
+ "format-full": "prettier --list-different --write \"*.{css,js,json,scss,ts,tsx}\" \"./**/*.{css,js,json,scss,ts,tsx}\"",
+
+ "integration-test": "npx playwright test",
+ "integration-test-snapshots": "npx playwright test -g 'profile picture' --update-snapshots",
+ "test": "mocha -r jsdom-global/register --recursive --exit --timeout 10000 \"./ts/test/**/*_test.js\"",
+ "coverage": "nyc --reporter=html mocha -r jsdom-global/register --recursive --exit --timeout 10000 \"./ts/test/**/*_test.js\"",
+
"build-release": "run-script-os",
- "build-release-non-linux": "yarn sass && yarn generate && cross-env SIGNAL_ENV=production electron-builder --config.extraMetadata.environment=production --publish=never --config.directories.output=release",
+ "build-release-non-linux": "yarn build-everything && cross-env SIGNAL_ENV=production electron-builder --config.extraMetadata.environment=production --publish=never --config.directories.output=release",
"build-release:win32": "yarn build-release-non-linux",
"build-release:macos": "yarn build-release-non-linux",
"build-release:linux": "yarn sedtoDeb; yarn build-release-non-linux && yarn sedtoAppImage && yarn build-release-non-linux && yarn sedtoDeb",
@@ -60,22 +75,11 @@
"build-release-publish:macos": "yarn build-release-publish-non-linux",
"build-release-publish:linux": "yarn sedtoDeb; yarn build-release-publish-non-linux && yarn sedtoAppImage && yarn build-release-publish-non-linux && yarn sedtoDeb",
"appImage": "yarn sedtoAppImage; yarn build-release-non-linux; yarn sedtoDeb",
- "build-protobuf": "pbjs --target static-module --wrap commonjs --out ts/protobuf/compiled.js protos/*.proto && pbts --out ts/protobuf/compiled.d.ts ts/protobuf/compiled.js --force-long",
- "test": "mocha -r jsdom-global/register --recursive --exit --timeout 10000 \"./ts/test/**/*_test.js\"",
- "coverage": "nyc --reporter=html mocha -r jsdom-global/register --recursive --exit --timeout 10000 \"./ts/test/**/*_test.js\"",
- "lint-full": "yarn format-full && eslint . && tslint --format stylish --project .",
- "format-full": "prettier --list-different --write \"*.{css,js,json,scss,ts,tsx}\" \"./**/*.{css,js,json,scss,ts,tsx}\"",
- "transpile": "yarn tsc && yarn parcel-util-worker && yarn sass",
- "transpile:watch": "yarn grunt --force; tsc -w",
- "integration-test": "npx playwright test",
- "integration-test-snapshots": "npx playwright test -g 'profile picture' --update-snapshots",
- "clean-transpile": "rimraf 'ts/**/*.js' 'ts/*.js' 'ts/*.js.map' 'ts/**/*.js.map' && rimraf tsconfig.tsbuildinfo;",
- "ready": "yarn grunt && yarn lint-full && yarn test",
"sedtoAppImage": "sed -i 's/\"target\": \\[\"deb\", \"rpm\", \"freebsd\"\\]/\"target\": \"AppImage\"/g' package.json",
"sedtoDeb": "sed -i 's/\"target\": \"AppImage\"/\"target\": \\[\"deb\", \"rpm\", \"freebsd\"\\]/g' package.json",
- "sass": "rimraf 'stylesheets/dist/' && parcel build --target sass --no-autoinstall --no-cache",
- "sass:watch": "rimraf 'stylesheets/dist/' && parcel watch --target sass --no-autoinstall --no-cache",
- "parcel-util-worker": "rimraf ts/webworker/workers/util.worker.js && parcel build --target util-worker --no-autoinstall --no-cache",
+ "ready": "yarn build-everything && yarn lint-full && yarn test",
+
+ "postinstall": "yarn patch-package && yarn electron-builder install-app-deps && yarn rebuild-curve25519-js",
"rebuild-curve25519-js": "cd node_modules/curve25519-js && yarn install && yarn build && cd ../../"
},
"dependencies": {
@@ -307,6 +311,7 @@
"package.json",
"config/default.json",
"config/${env.SIGNAL_ENV}.json",
+ "config/local-${env.SIGNAL_ENV}.json",
"background.html",
"about.html",
"password.html",
diff --git a/ts/components/conversation/message/reactions/Reaction.tsx b/ts/components/conversation/message/reactions/Reaction.tsx
index 540d3a591..a1ba40786 100644
--- a/ts/components/conversation/message/reactions/Reaction.tsx
+++ b/ts/components/conversation/message/reactions/Reaction.tsx
@@ -24,7 +24,6 @@ const StyledReaction = styled.button<{ selected: boolean; inModal: boolean; show
margin: 0 4px var(--margins-sm);
height: 24px;
min-width: ${props => (props.showCount ? '48px' : '24px')};
- ${props => props.inModal && 'width: 100%;'}
span {
width: 100%;
@@ -35,7 +34,7 @@ const StyledReactionContainer = styled.div<{
inModal: boolean;
}>`
position: relative;
- ${props => props.inModal && 'margin-right: 8px;'}
+ ${props => props.inModal && 'white-space: nowrap; margin-right: 8px;'}
`;
export type ReactionProps = {
diff --git a/ts/components/leftpane/ActionsPanel.tsx b/ts/components/leftpane/ActionsPanel.tsx
index 0bae85aec..7d6d4231b 100644
--- a/ts/components/leftpane/ActionsPanel.tsx
+++ b/ts/components/leftpane/ActionsPanel.tsx
@@ -26,11 +26,7 @@ import { cleanUpOldDecryptedMedias } from '../../session/crypto/DecryptedAttachm
import { DURATION } from '../../session/constants';
-import {
- editProfileModal,
- onionPathModal,
- updateConfirmModal,
-} from '../../state/ducks/modalDialog';
+import { editProfileModal, onionPathModal } from '../../state/ducks/modalDialog';
import { uploadOurAvatar } from '../../interactions/conversationInteractions';
import { ModalContainer } from '../dialog/ModalContainer';
import { debounce, isEmpty, isString } from 'lodash';
@@ -52,8 +48,6 @@ import { LeftPaneSectionContainer } from './LeftPaneSectionContainer';
import { ipcRenderer } from 'electron';
import { UserUtils } from '../../session/utils';
-import { Storage } from '../../util/storage';
-import { SettingsKey } from '../../data/settings-key';
import { getLatestReleaseFromFileServer } from '../../session/apis/file_server_api/FileServerApi';
import { switchThemeTo } from '../../session/utils/Theme';
@@ -209,8 +203,6 @@ const doAppStartUp = () => {
void loadDefaultRooms();
debounce(triggerAvatarReUploadIfNeeded, 200);
-
- void askEnablingOpengroupPruningIfNeeded();
};
const CallContainer = () => {
@@ -239,36 +231,6 @@ async function fetchReleaseFromFSAndUpdateMain() {
}
}
-async function askEnablingOpengroupPruningIfNeeded() {
- if (Storage.get(SettingsKey.settingsOpengroupPruning) === undefined) {
- const setSettingsAndCloseDialog = async (valueToSetPruningTo: boolean) => {
- await window.setSettingValue(SettingsKey.settingsOpengroupPruning, valueToSetPruningTo);
- await window.setOpengroupPruning(valueToSetPruningTo);
- window.inboxStore?.dispatch(updateConfirmModal(null));
- };
- window.inboxStore?.dispatch(
- updateConfirmModal({
- onClickOk: async () => {
- await setSettingsAndCloseDialog(true);
- },
- onClickClose: async () => {
- await setSettingsAndCloseDialog(false);
- },
- onClickCancel: async () => {
- await setSettingsAndCloseDialog(false);
- },
- title: window.i18n('pruningOpengroupDialogTitle'),
- message: window.i18n('pruningOpengroupDialogMessage'),
- messageSub: window.i18n('pruningOpengroupDialogSubMessage'),
- okText: window.i18n('enable'),
- cancelText: window.i18n('keepDisabled'),
- })
- );
- return;
- }
- // otherwise nothing to do. the settings is already on or off, but as expected by the user
-}
-
/**
* ActionsPanel is the far left banner (not the left pane).
* The panel with buttons to switch between the message/contact/settings/theme views
diff --git a/ts/models/message.ts b/ts/models/message.ts
index f93f56573..9671b95d6 100644
--- a/ts/models/message.ts
+++ b/ts/models/message.ts
@@ -830,6 +830,12 @@ export class MessageModel extends Backbone.Model {
fileIdsToLink.push(firstQuoteAttachmentId);
}
}
+
+ const isFirstAttachmentVoiceMessage = finalAttachments?.[0]?.isVoiceMessage;
+ if (isFirstAttachmentVoiceMessage) {
+ attachments[0].flags = SignalService.AttachmentPointer.Flags.VOICE_MESSAGE;
+ }
+
window.log.info(`Upload of message data for message ${this.idForLogging()} is finished.`);
return {
body,
diff --git a/ts/node/sql.ts b/ts/node/sql.ts
index d3b876b6d..29c8bd6a6 100644
--- a/ts/node/sql.ts
+++ b/ts/node/sql.ts
@@ -52,6 +52,7 @@ import {
openAndMigrateDatabase,
updateSchema,
} from './migration/signalMigrations';
+import { SettingsKey } from '../data/settings-key';
// tslint:disable: no-console function-name non-literal-fs-path
@@ -2064,13 +2065,12 @@ function cleanUpOldOpengroupsOnStart() {
console.info('cleanUpOldOpengroups: ourNumber is not set');
return;
}
- const pruneSetting = getItemById('prune-setting')?.value;
+ let pruneSetting = getItemById(SettingsKey.settingsOpengroupPruning)?.value;
if (pruneSetting === undefined) {
- console.info(
- 'Prune settings is undefined, skipping cleanUpOldOpengroups but we will need to ask user'
- );
- return;
+ console.info('Prune settings is undefined (and not explicitely false), forcing it to true.');
+ createOrUpdateItem({ id: SettingsKey.settingsOpengroupPruning, value: true });
+ pruneSetting = true;
}
if (!pruneSetting) {
diff --git a/ts/session/apis/open_group_api/opengroupV2/OpenGroupServerPoller.ts b/ts/session/apis/open_group_api/opengroupV2/OpenGroupServerPoller.ts
index 8c2eae034..27a0bc550 100644
--- a/ts/session/apis/open_group_api/opengroupV2/OpenGroupServerPoller.ts
+++ b/ts/session/apis/open_group_api/opengroupV2/OpenGroupServerPoller.ts
@@ -316,12 +316,7 @@ export class OpenGroupServerPoller {
}
// ==> At this point all those results need to trigger conversation updates, so update what we have to update
- await handleBatchPollResults(
- this.serverUrl,
- batchPollResults,
- subrequestOptions,
- this.roomIdsToPoll
- );
+ await handleBatchPollResults(this.serverUrl, batchPollResults, subrequestOptions);
} catch (e) {
window?.log?.warn('Got error while compact fetch:', e.message);
} finally {
diff --git a/ts/session/apis/open_group_api/sogsv3/sogsApiV3.ts b/ts/session/apis/open_group_api/sogsv3/sogsApiV3.ts
index 190c7ec15..c8e8ce1dc 100644
--- a/ts/session/apis/open_group_api/sogsv3/sogsApiV3.ts
+++ b/ts/session/apis/open_group_api/sogsv3/sogsApiV3.ts
@@ -82,8 +82,7 @@ async function handlePollInfoResponse(
hidden_moderators?: Array;
};
},
- serverUrl: string,
- roomIdsStillPolled: Set
+ serverUrl: string
) {
if (statusCode !== 200) {
window.log.info('handlePollInfoResponse subRequest status code is not 200:', statusCode);
@@ -101,8 +100,9 @@ async function handlePollInfoResponse(
window.log.info('handlePollInfoResponse token and serverUrl must be set');
return;
}
+ const stillPolledRooms = OpenGroupData.getV2OpenGroupRoomsByServerUrl(serverUrl);
- if (!roomIdsStillPolled.has(token)) {
+ if (!stillPolledRooms?.some(r => r.roomId === token && r.serverUrl === serverUrl)) {
window.log.info('handlePollInfoResponse room is no longer polled: ', token);
return;
}
@@ -188,8 +188,7 @@ const handleSogsV3DeletedMessages = async (
const handleMessagesResponseV4 = async (
messages: Array,
serverUrl: string,
- subrequestOption: SubRequestMessagesType,
- roomIdsStillPolled: Set
+ subrequestOption: SubRequestMessagesType
) => {
if (!subrequestOption || !subrequestOption.messages) {
window?.log?.error('handleBatchPollResults - missing fields required for message subresponse');
@@ -199,7 +198,9 @@ const handleMessagesResponseV4 = async (
try {
const { roomId } = subrequestOption.messages;
- if (!roomIdsStillPolled.has(roomId)) {
+ const stillPolledRooms = OpenGroupData.getV2OpenGroupRoomsByServerUrl(serverUrl);
+
+ if (!stillPolledRooms?.some(r => r.roomId === roomId && r.serverUrl === serverUrl)) {
window.log.info(`handleMessagesResponseV4: we are no longer polling for ${roomId}: skipping`);
return;
}
@@ -490,8 +491,7 @@ export const handleBatchPollResults = async (
serverUrl: string,
batchPollResults: BatchSogsReponse,
/** using this as explicit way to ensure order */
- subrequestOptionsLookup: Array,
- roomIdsStillPolled: Set // if we get anything for a room we stopped polling, we need to skip it.
+ subrequestOptionsLookup: Array
) => {
// @@: Might not need the explicit type field.
// pro: prevents cases where accidentally two fields for the opt. e.g. capability and message fields truthy.
@@ -520,20 +520,10 @@ export const handleBatchPollResults = async (
break;
case 'messages':
// this will also include deleted messages explicitly with `data: null` & edited messages with a new data field & react changes with data not existing
- await handleMessagesResponseV4(
- subResponse.body,
- serverUrl,
- subrequestOption,
- roomIdsStillPolled
- );
+ await handleMessagesResponseV4(subResponse.body, serverUrl, subrequestOption);
break;
case 'pollInfo':
- await handlePollInfoResponse(
- subResponse.code,
- subResponse.body,
- serverUrl,
- roomIdsStillPolled
- );
+ await handlePollInfoResponse(subResponse.code, subResponse.body, serverUrl);
break;
case 'inbox':
await handleInboxOutboxMessages(subResponse.body, serverUrl, false);
diff --git a/ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts b/ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts
index 073ea5f11..7461b16f4 100644
--- a/ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts
+++ b/ts/session/apis/open_group_api/sogsv3/sogsV3BatchPoll.ts
@@ -282,12 +282,15 @@ const makeBatchRequestPayload = (
method: 'POST',
path: `/user/${sessionId}/moderator`,
+ // An admin has moderator permissions automatically, but removing his admin permissions only will keep him as a moderator.
+ // We do not want this currently. When removing an admin from Session Desktop we want to remove all his permissions server side.
+ // We'll need to build a complete dialog with options to make the whole admins/moderator/global/visible/hidden logic work as the server was built for.
json: {
rooms: [options.addRemoveModerators.roomId],
global: false,
- // moderator: isAddMod, // currently we only support adding/removing visible admins
visible: true,
admin: isAddMod,
+ moderator: isAddMod,
},
}));
case 'banUnbanUser':
diff --git a/ts/session/sending/MessageSender.ts b/ts/session/sending/MessageSender.ts
index 35f2eefbd..62742812e 100644
--- a/ts/session/sending/MessageSender.ts
+++ b/ts/session/sending/MessageSender.ts
@@ -35,6 +35,7 @@ function overwriteOutgoingTimestampWithNetworkTimestamp(message: RawMessage) {
const { plainTextBuffer } = message;
const contentDecoded = SignalService.Content.decode(plainTextBuffer);
+
const { dataMessage, dataExtractionNotification, typingMessage } = contentDecoded;
if (dataMessage && dataMessage.timestamp && dataMessage.timestamp > 0) {
// this is a sync message, do not overwrite the message timestamp
diff --git a/ts/session/utils/Attachments.ts b/ts/session/utils/Attachments.ts
index face38e71..922dc2c01 100644
--- a/ts/session/utils/Attachments.ts
+++ b/ts/session/utils/Attachments.ts
@@ -56,6 +56,8 @@ async function uploadToFileServer(params: UploadParams): Promise;
diff --git a/ts/util/attachmentsUtil.ts b/ts/util/attachmentsUtil.ts
index cedb8a0e5..8637a09a1 100644
--- a/ts/util/attachmentsUtil.ts
+++ b/ts/util/attachmentsUtil.ts
@@ -332,8 +332,6 @@ export async function getFileAndStoreLocally(
screenshot: attachmentSavedLocally.screenshot,
thumbnail: attachmentSavedLocally.thumbnail,
size: attachmentSavedLocally.size,
-
- // url: undefined,
flags: attachmentFlags || undefined,
};
}