diff --git a/README.md b/README.md
index f60ac424a1..d0c76e8899 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@
Encrypted p2p team chat with no servers, just Tor.
- Downloads |
+ Downloads |
How it Works |
Features |
Threat Model |
@@ -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).
diff --git a/docs/example.md b/docs/example.md
new file mode 100644
index 0000000000..c2dd809d77
--- /dev/null
+++ b/docs/example.md
@@ -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)
\ No newline at end of file
diff --git a/docs/handleCsrReplicationEvent.md b/docs/handleCsrReplicationEvent.md
new file mode 100644
index 0000000000..7835ba10c6
--- /dev/null
+++ b/docs/handleCsrReplicationEvent.md
@@ -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
\ No newline at end of file
diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md
index 1c6ad3dafd..0665f2f495 100644
--- a/packages/backend/CHANGELOG.md
+++ b/packages/backend/CHANGELOG.md
@@ -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/backend@2.0.3-alpha.2...@quiet/backend@2.0.3-alpha.3) (2023-11-13)
+
+**Note:** Version bump only for package @quiet/backend
+
+
+
+
+
+## [2.0.3-alpha.2](https://github.com/TryQuiet/backend/compare/@quiet/backend@2.0.3-alpha.1...@quiet/backend@2.0.3-alpha.2) (2023-11-09)
+
+**Note:** Version bump only for package @quiet/backend
+
+
+
+
+
## [2.0.3-alpha.1](https://github.com/TryQuiet/backend/compare/@quiet/backend@2.0.3-alpha.0...@quiet/backend@2.0.3-alpha.1) (2023-11-08)
**Note:** Version bump only for package @quiet/backend
diff --git a/packages/backend/package-lock.json b/packages/backend/package-lock.json
index 85c772d158..15500283f1 100644
--- a/packages/backend/package-lock.json
+++ b/packages/backend/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@quiet/backend",
- "version": "2.0.3-alpha.1",
+ "version": "2.0.3-alpha.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@quiet/backend",
- "version": "2.0.3-alpha.1",
+ "version": "2.0.3-alpha.3",
"license": "MIT",
"dependencies": {
"@chainsafe/libp2p-gossipsub": "6.1.0",
diff --git a/packages/backend/package.json b/packages/backend/package.json
index 962a0fe82f..d167a3615d 100644
--- a/packages/backend/package.json
+++ b/packages/backend/package.json
@@ -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",
@@ -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",
diff --git a/packages/backend/src/nest/registration/registration.service.spec.ts b/packages/backend/src/nest/registration/registration.service.spec.ts
index 6355013592..98abe55d4b 100644
--- a/packages/backend/src/nest/registration/registration.service.spec.ts
+++ b/packages/backend/src/nest/registration/registration.service.spec.ts
@@ -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
@@ -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)
+ })
})
diff --git a/packages/backend/src/nest/registration/registration.service.ts b/packages/backend/src/nest/registration/registration.service.ts
index ac9dadd7d7..2f6e0d90d9 100644
--- a/packages/backend/src/nest/registration/registration.service.ts
+++ b/packages/backend/src/nest/registration/registration.service.ts
@@ -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 })
}
diff --git a/packages/backend/src/nest/storage/storage.service.ts b/packages/backend/src/nest/storage/storage.service.ts
index 9a46b8ee23..0068130d95 100644
--- a/packages/backend/src/nest/storage/storage.service.ts
+++ b/packages/backend/src/nest/storage/storage.service.ts
@@ -432,6 +432,7 @@ export class StorageService extends EventEmitter {
},
})
+ // DOCS -> handleCsrReplicationEvent.md
this.certificatesRequests.events.on('replicated', async () => {
this.logger('REPLICATED: CSRs')
diff --git a/packages/desktop/CHANGELOG.md b/packages/desktop/CHANGELOG.md
index 76314dcb9b..7508693170 100644
--- a/packages/desktop/CHANGELOG.md
+++ b/packages/desktop/CHANGELOG.md
@@ -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/desktop@2.0.3-alpha.2...@quiet/desktop@2.0.3-alpha.3) (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/desktop@2.0.3-alpha.1...@quiet/desktop@2.0.3-alpha.2) (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/desktop@2.0.3-alpha.0...@quiet/desktop@2.0.3-alpha.1) (2023-11-08)
**Note:** Version bump only for package @quiet/desktop
diff --git a/packages/desktop/package-lock.json b/packages/desktop/package-lock.json
index 912309b297..a412d51019 100644
--- a/packages/desktop/package-lock.json
+++ b/packages/desktop/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@quiet/desktop",
- "version": "2.0.3-alpha.1",
+ "version": "2.0.3-alpha.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@quiet/desktop",
- "version": "2.0.3-alpha.1",
+ "version": "2.0.3-alpha.3",
"license": "ISC",
"dependencies": {
"@electron/remote": "^2.0.8",
diff --git a/packages/desktop/package.json b/packages/desktop/package.json
index b316ef16b7..c15fe02713 100644
--- a/packages/desktop/package.json
+++ b/packages/desktop/package.json
@@ -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": {
@@ -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",
diff --git a/packages/desktop/src/renderer/components/widgets/channels/BasicMessage.tsx b/packages/desktop/src/renderer/components/widgets/channels/BasicMessage.tsx
index fe6ab39c28..460d577e7e 100644
--- a/packages/desktop/src/renderer/components/widgets/channels/BasicMessage.tsx
+++ b/packages/desktop/src/renderer/components/widgets/channels/BasicMessage.tsx
@@ -177,11 +177,17 @@ export const BasicMessageComponent: React.FC = ({
const isUnregistered = type === UserLabelType.UNREGISTERED
const handleOpen = isUnregistered ? unregisteredUsernameModalHandleOpen : duplicatedUsernameModalHandleOpen
+ console.log('Unregistered Debug - UserLabel Component', { isUnregistered })
+
return (
CFBundleVersion
- 328
+ 331
ITSAppUsesNonExemptEncryption
LSRequiresIPhoneOS
diff --git a/packages/mobile/ios/QuietTests/Info.plist b/packages/mobile/ios/QuietTests/Info.plist
index 82d7ab4c4b..4bd108f49e 100644
--- a/packages/mobile/ios/QuietTests/Info.plist
+++ b/packages/mobile/ios/QuietTests/Info.plist
@@ -19,6 +19,6 @@
CFBundleSignature
????
CFBundleVersion
- 328
+ 331
diff --git a/packages/mobile/package-lock.json b/packages/mobile/package-lock.json
index 35cf3ee6c2..d56e53e2c0 100644
--- a/packages/mobile/package-lock.json
+++ b/packages/mobile/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@quiet/mobile",
- "version": "2.0.3-alpha.1",
+ "version": "2.0.3-alpha.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@quiet/mobile",
- "version": "2.0.3-alpha.1",
+ "version": "2.0.3-alpha.4",
"dependencies": {
"@peculiar/webcrypto": "^1.4.3",
"@react-native-clipboard/clipboard": "^1.11.2",
diff --git a/packages/mobile/package.json b/packages/mobile/package.json
index 44e8ec9a5a..1264bec9d4 100644
--- a/packages/mobile/package.json
+++ b/packages/mobile/package.json
@@ -1,6 +1,6 @@
{
"name": "@quiet/mobile",
- "version": "2.0.3-alpha.1",
+ "version": "2.0.3-alpha.4",
"scripts": {
"build": "tsc -p tsconfig.build.json --noEmit",
"storybook-android": "ENVFILE=.env.storybook react-native run-android --variant=storybookDebug --appIdSuffix=storybook.debug",
@@ -22,10 +22,10 @@
},
"dependencies": {
"@peculiar/webcrypto": "^1.4.3",
- "@quiet/backend": "^2.0.3-alpha.1",
+ "@quiet/backend": "^2.0.3-alpha.3",
"@quiet/common": "^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",
"@quiet/types": "^2.0.2-alpha.0",
"@react-native-clipboard/clipboard": "^1.11.2",
"@react-navigation/native": "^6.0.0",
diff --git a/packages/state-manager/CHANGELOG.md b/packages/state-manager/CHANGELOG.md
index 3fe30c0d3a..95d8665a14 100644
--- a/packages/state-manager/CHANGELOG.md
+++ b/packages/state-manager/CHANGELOG.md
@@ -3,6 +3,17 @@
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/@quiet/state-manager@2.0.2-alpha.0...@quiet/state-manager@2.0.2-alpha.1) (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.2-alpha.0](https://github.com/TryQuiet/quiet/compare/@quiet/state-manager@2.0.1-alpha.6...@quiet/state-manager@2.0.2-alpha.0) (2023-10-26)
**Note:** Version bump only for package @quiet/state-manager
diff --git a/packages/state-manager/package-lock.json b/packages/state-manager/package-lock.json
index 7228b856c3..bff02c6bb6 100644
--- a/packages/state-manager/package-lock.json
+++ b/packages/state-manager/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@quiet/state-manager",
- "version": "2.0.2-alpha.0",
+ "version": "2.0.2-alpha.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@quiet/state-manager",
- "version": "2.0.2-alpha.0",
+ "version": "2.0.2-alpha.1",
"license": "ISC",
"dependencies": {
"@reduxjs/toolkit": "^1.9.1",
diff --git a/packages/state-manager/package.json b/packages/state-manager/package.json
index 07c2846536..6f3d309c23 100644
--- a/packages/state-manager/package.json
+++ b/packages/state-manager/package.json
@@ -1,6 +1,6 @@
{
"name": "@quiet/state-manager",
- "version": "2.0.2-alpha.0",
+ "version": "2.0.2-alpha.1",
"description": "",
"main": "lib/index.js",
"private": true,
diff --git a/packages/state-manager/src/sagas/users/users.selectors.ts b/packages/state-manager/src/sagas/users/users.selectors.ts
index ed29f0a23e..fcb7a82150 100644
--- a/packages/state-manager/src/sagas/users/users.selectors.ts
+++ b/packages/state-manager/src/sagas/users/users.selectors.ts
@@ -81,7 +81,19 @@ export const allUsers = createSelector(csrsMapping, certificatesMapping, (csrs,
const allUsernames: string[] = Object.values(csrs).map(u => u.username)
const duplicatedUsernames: string[] = allUsernames.filter((val, index) => allUsernames.indexOf(val) !== index)
+ // Temporary backward compatiblility! Old communities do not have csrs
+ Object.keys(certs).map(pubKey => {
+ users[pubKey] = {
+ ...certs[pubKey],
+ isRegistered: true,
+ isDuplicated: false,
+ pubKey,
+ }
+ console.log('Unregistered Debug - allUsers selector - certs - user', users[pubKey])
+ })
+
Object.keys(csrs).map(pubKey => {
+ if (users[pubKey]) return
const username = csrs[pubKey].username
let isDuplicated: boolean
@@ -93,23 +105,16 @@ export const allUsers = createSelector(csrsMapping, certificatesMapping, (csrs,
const isRegistered = Boolean(certs[pubKey])
+ console.log('Unregistered Debug - allUsers selector - csrs - certs[pubKey]', certs[pubKey])
+
users[pubKey] = {
...csrs[pubKey],
isRegistered,
isDuplicated,
pubKey,
}
- })
-
- // Temporary backward compatiblility! Old communities do not have csrs
- Object.keys(certs).map(pubKey => {
- if (users[pubKey]) return
- users[pubKey] = {
- ...certs[pubKey],
- isRegistered: true,
- isDuplicated: false,
- pubKey,
- }
+
+ console.log('Unregistered Debug - allUsers selector - csrs - user', users[pubKey])
})
return users