Skip to content

Commit

Permalink
Merge branch 'develop' into fix/1900
Browse files Browse the repository at this point in the history
  • Loading branch information
siepra authored Nov 13, 2023
2 parents 5e08cb6 + 27e7916 commit ee4fe8b
Show file tree
Hide file tree
Showing 28 changed files with 214 additions and 41 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Encrypted p2p team chat with no servers, just Tor.
<br />
<!-- <a href="https://tryquiet.org"><strong>tryquiet.org »</strong></a> -->
<a href="https://github.com/TryQuiet/quiet/releases/tag/quiet%401.9.5"><strong>Downloads</strong></a> |
<a href="https://github.com/TryQuiet/quiet/releases/tag/quiet%401.9.6"><strong>Downloads</strong></a> |
<a href="#how-it-works"><strong>How it Works</strong></a> |
<a href="#features"><strong>Features</strong></a> |
<a href="https://github.com/TryQuiet/monorepo/wiki/Threat-Model"><strong>Threat Model</strong></a> |
Expand Down Expand Up @@ -52,7 +52,7 @@ See our [FAQ](https://github.com/TryQuiet/monorepo/wiki/Quiet-FAQ) for answers t

## Getting started

To try Quiet, download the [latest release](https://github.com/TryQuiet/quiet/releases/tag/quiet%401.9.5) for your platform (.dmg for macOS, .exe for Windows, etc.) and install it in the normal way. Then create a community and open the community's settings to invite members.
To try Quiet, download the [latest release](https://github.com/TryQuiet/quiet/releases/tag/quiet%401.9.6) for your platform (.dmg for macOS, .exe for Windows, etc.) and install it in the normal way. Then create a community and open the community's settings to invite members.

If you'd like to help develop Quiet, see [Contributing to Quiet](#contributing-to-quiet).

Expand Down
19 changes: 19 additions & 0 deletions docs/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Title:

## Status:
(accepted | rejected | proposed | deprecated)

## Context:
(what is our problem)

## Decision:
(how it will affect app or individual parts of the app)

## Consequences:
(how it will affect app or individual parts of the app)

## Code location:
(package->file)

## Date:
(dd.mm.rrrr)
20 changes: 20 additions & 0 deletions docs/handleCsrReplicationEvent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Title:
Handle possibility of multiple replication events in certificate requests at the same time

## Status:
accepted

## Context:
Kinga discovered a bug where when the owner is offline and several (3) users with the same name have joined, sometimes the owner can register two users with the same name

## Decision:
Introducing a locking mechanism to prevent the next event from being processed if the previous one is still being processed

## Consequences:
We added queue concept and events will be processed individually in chronological order

## Code location:
backend -> storage.service.ts

## Date:
07-11-2023
16 changes: 16 additions & 0 deletions packages/backend/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.0.3-alpha.3](https://github.com/TryQuiet/backend/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-11-13)

**Note:** Version bump only for package @quiet/backend





## [2.0.3-alpha.2](https://github.com/TryQuiet/backend/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-11-09)

**Note:** Version bump only for package @quiet/backend





## [2.0.3-alpha.1](https://github.com/TryQuiet/backend/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-11-08)

**Note:** Version bump only for package @quiet/backend
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@quiet/backend",
"version": "2.0.3-alpha.1",
"version": "2.0.3-alpha.3",
"description": "tlg-manager",
"types": "lib/index.d.ts",
"type": "module",
Expand Down Expand Up @@ -54,7 +54,7 @@
"@nestjs/schematics": "^10.0.0",
"@nestjs/testing": "^10.0.0",
"@quiet/eslint-config": "^2.0.2-alpha.0",
"@quiet/state-manager": "^2.0.2-alpha.0",
"@quiet/state-manager": "^2.0.2-alpha.1",
"@types/crypto-js": "^4.0.2",
"@types/express": "^4.17.9",
"@types/jest": "28.1.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Time } from 'pkijs'
import { issueCertificate, extractPendingCsrs } from './registration.functions'
import { jest } from '@jest/globals'
import { createTmpDir } from '../common/utils'
import { RegistrationEvents } from './registration.types'

describe('RegistrationService', () => {
let module: TestingModule
Expand Down Expand Up @@ -146,4 +147,37 @@ describe('RegistrationService', () => {
expect(pendingCsrs.length).toEqual(1)
expect(pendingCsrs[0]).toBe(userCsr.userCsr)
})

it('wait for all NEW_USER events until emitting FINISHED_ISSUING_CERTIFICATES_FOR_ID', async () => {
registrationService.permsData = permsData

const eventSpy = jest.spyOn(registrationService, 'emit')

const userCsr = await createUserCsr({
nickname: 'alice',
commonName: 'nqnw4kc4c77fb47lk52m5l57h4tcxceo7ymxekfn7yh5m66t4jv2olad.onion',
peerId: 'Qmf3ySkYqLET9xtAtDzvAr5Pp3egK1H3C5iJAZm1SpLEp6',
dmPublicKey: 'testdmPublicKey',
signAlg: configCrypto.signAlg,
hashAlg: configCrypto.hashAlg,
})
const userCsr2 = await createUserCsr({
nickname: 'karol',
commonName: 'nnnnnnc4c77fb47lk52m5l57h4tcxceo7ymxekfn7yh5m66t4jv2olad.onion',
peerId: 'QmffffffqLET9xtAtDzvAr5Pp3egK1H3C5iJAZm1SpLEp6',
dmPublicKey: 'testdmPublicKey',
signAlg: configCrypto.signAlg,
hashAlg: configCrypto.hashAlg,
})

const csrs: string[] = [userCsr.userCsr, userCsr2.userCsr]
// @ts-ignore - fn 'issueCertificates' is private
await registrationService.issueCertificates({ certificates: [], csrs, id: 1 })

expect(eventSpy).toHaveBeenLastCalledWith(RegistrationEvents.FINISHED_ISSUING_CERTIFICATES_FOR_ID, {
id: 1,
})

expect(eventSpy).toHaveBeenCalledTimes(3)
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ export class RegistrationService extends EventEmitter implements OnModuleInit {
return
}
const pendingCsrs = await extractPendingCsrs(payload)
pendingCsrs.forEach(async csr => {
await this.registerUserCertificate(csr)
})

await Promise.all(
pendingCsrs.map(async csr => {
await this.registerUserCertificate(csr)
})
)

if (payload.id) this.emit(RegistrationEvents.FINISHED_ISSUING_CERTIFICATES_FOR_ID, { id: payload.id })
}
Expand Down
1 change: 1 addition & 0 deletions packages/backend/src/nest/storage/storage.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ export class StorageService extends EventEmitter {
},
})

// DOCS -> handleCsrReplicationEvent.md
this.certificatesRequests.events.on('replicated', async () => {
this.logger('REPLICATED: CSRs')

Expand Down
22 changes: 22 additions & 0 deletions packages/desktop/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.0.3-alpha.3](https://github.com/TryQuiet/quiet/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-11-13)


### Features

* add debug logs ([#2057](https://github.com/TryQuiet/quiet/issues/2057)) ([aa3e777](https://github.com/TryQuiet/quiet/commit/aa3e777778b0861d5f96e6116bfc70031ed67929))





## [2.0.3-alpha.2](https://github.com/TryQuiet/quiet/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-11-09)


### Bug Fixes

* trigger desktop ([2898bee](https://github.com/TryQuiet/quiet/commit/2898bee80bbf2f16cbda67281a29e47716faa77c))





## [2.0.3-alpha.1](https://github.com/TryQuiet/quiet/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-11-08)

**Note:** Version bump only for package @quiet/desktop
Expand Down
4 changes: 2 additions & 2 deletions packages/desktop/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
},
"homepage": "https://github.com/TryQuiet",
"@comment version": "To build new version for specific platform, just replace platform in version tag to one of following linux, mac, windows",
"version": "2.0.3-alpha.1",
"version": "2.0.3-alpha.3",
"description": "Decentralized team chat",
"main": "dist/main/main.js",
"scripts": {
Expand Down Expand Up @@ -158,7 +158,7 @@
"@mui/material": "~5.10.15",
"@quiet/eslint-config": "^2.0.2-alpha.0",
"@quiet/identity": "^2.0.2-alpha.0",
"@quiet/state-manager": "^2.0.2-alpha.0",
"@quiet/state-manager": "^2.0.2-alpha.1",
"@redux-saga/types": "^1.1.0",
"@reduxjs/toolkit": "^1.9.1",
"@sentry/browser": "^6.19.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,17 @@ export const BasicMessageComponent: React.FC<BasicMessageProps & FileActionsProp
? UserLabelType.UNREGISTERED
: null

console.log('Unregistered Debug - Basic Message', { userLabel })

const infoMessage = messageDisplayData.type === 3 // 3 stands for MessageType.Info

console.log('Unregistered Debug - Basic Message', { infoMessage })

// Grey out sender name if the first message hasn't been sent yet
const pending: boolean = pendingMessages[messageDisplayData.id] !== undefined

console.log('Unregistered Debug - Basic Message - condition to display label', userLabel && !infoMessage)

return (
<StyledListItem
className={classNames({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ const UserLabel: React.FC<UserLabelProps> = ({
const isUnregistered = type === UserLabelType.UNREGISTERED
const handleOpen = isUnregistered ? unregisteredUsernameModalHandleOpen : duplicatedUsernameModalHandleOpen

console.log('Unregistered Debug - UserLabel Component', { isUnregistered })

return (
<StyledGrid>
<Grid
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react'
import { AnyAction, Dispatch, bindActionCreators } from 'redux'
import { useDispatch } from 'react-redux'

import UpdateModal from '../../../components/widgets/update/UpdateModal'
import updateHandlers from '../../../store/handlers/update'
import { useModal } from '../../hooks'
Expand Down
8 changes: 8 additions & 0 deletions packages/integration-tests/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.0.2-alpha.1](https://github.com/TryQuiet/quiet/compare/[email protected]@2.0.2-alpha.1) (2023-11-13)

**Note:** Version bump only for package integration-tests





## [2.0.2-alpha.0](https://github.com/TryQuiet/quiet/compare/[email protected]@2.0.2-alpha.0) (2023-10-26)

**Note:** Version bump only for package integration-tests
Expand Down
4 changes: 2 additions & 2 deletions packages/integration-tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/integration-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "integration-tests",
"version": "2.0.2-alpha.0",
"version": "2.0.2-alpha.1",
"description": "",
"types": "lib/index.d.ts",
"main": "lib/index.js",
Expand Down Expand Up @@ -36,7 +36,7 @@
"@peculiar/webcrypto": "1.4.3",
"@quiet/identity": "^2.0.2-alpha.0",
"@quiet/logger": "^2.0.2-alpha.0",
"@quiet/state-manager": "^2.0.2-alpha.0",
"@quiet/state-manager": "^2.0.2-alpha.1",
"@reduxjs/toolkit": "^1.6.1",
"commander": "^9.1.0",
"debug": "^4.3.2",
Expand Down
27 changes: 27 additions & 0 deletions packages/mobile/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.0.3-alpha.4](https://github.com/TryQuiet/quiet/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-11-13)


### Features

* bump versionCode ([104c656](https://github.com/TryQuiet/quiet/commit/104c6569805efecffcc23a801a8ba91a352966fe))





## [2.0.3-alpha.3](https://github.com/TryQuiet/quiet/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-11-13)

**Note:** Version bump only for package @quiet/mobile





## [2.0.3-alpha.2](https://github.com/TryQuiet/quiet/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-11-09)

**Note:** Version bump only for package @quiet/mobile





## [2.0.3-alpha.1](https://github.com/TryQuiet/quiet/compare/@quiet/[email protected]...@quiet/[email protected]) (2023-11-08)


Expand Down
4 changes: 2 additions & 2 deletions packages/mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ android {
applicationId "com.quietmobile"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 368
versionName "2.0.3-alpha.1"
versionCode 374
versionName "2.0.3-alpha.4"
resValue "string", "build_config_package", "com.quietmobile"
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/ios/Quiet/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>328</string>
<string>331</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false />
<key>LSRequiresIPhoneOS</key>
Expand Down
2 changes: 1 addition & 1 deletion packages/mobile/ios/QuietTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>328</string>
<string>331</string>
</dict>
</plist>
Loading

0 comments on commit ee4fe8b

Please sign in to comment.