Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
fc5f171
initial UI work still WIP
adrastaea Aug 1, 2025
6172850
fix spacing
adrastaea Aug 19, 2025
d82a719
bring styling more in line with figma
adrastaea Aug 19, 2025
197210d
handle dark mode better
adrastaea Aug 19, 2025
8700940
rely on theme more
adrastaea Aug 19, 2025
2f92d14
bring back some of the specific font params
adrastaea Aug 19, 2025
5ae7fb4
more theme reliance
adrastaea Aug 19, 2025
bf6ce81
pass qss input from frontend to backend
adrastaea Aug 20, 2025
6285bb5
add test
adrastaea Aug 21, 2025
c2b9740
add e2e test utils
adrastaea Aug 21, 2025
2b7026f
update snapshot
adrastaea Aug 21, 2025
7e8c893
add mobile server screen
adrastaea Aug 22, 2025
840df6a
rm annoying default margin on button component, improve server offer …
adrastaea Aug 22, 2025
bf400fa
adjust spacing and update Appbar title
adrastaea Aug 22, 2025
b2920c8
intergrate server offer component in drawer
adrastaea Aug 22, 2025
18e97aa
make drawer story
adrastaea Aug 22, 2025
221344a
update ServerOfferDrawer story layout and spacing
adrastaea Aug 22, 2025
0c07aed
update type
adrastaea Aug 22, 2025
9703a3f
conditionally display 'Don't show this again' option
adrastaea Aug 22, 2025
44f5042
update test
adrastaea Aug 22, 2025
b7f072e
apply correct margin replacement from button mod, rm big tech server …
adrastaea Aug 25, 2025
b76f29d
only show drawer when QSS_ALLOWED
adrastaea Aug 25, 2025
bf916f8
update changelog
adrastaea Aug 25, 2025
9f2b795
Merge remote-tracking branch 'origin/develop' into feat/2910-ui-qss-o…
adrastaea Aug 25, 2025
f180184
update changelog
adrastaea Aug 25, 2025
2ef6bdf
move debug feature in changelog to 6.1.0 where it belongs
adrastaea Aug 25, 2025
6f29ffa
first draft
adrastaea Aug 25, 2025
19f7b9f
fix centering of modals without headers
adrastaea Aug 25, 2025
f080b41
Merge branch 'feat/2910-ui-qss-opt-in' into feat/2911-joining-user-qs…
adrastaea Aug 25, 2025
1e4e5ad
refactor: simplify JoiningOptInComponent by removing unused props and…
adrastaea Aug 25, 2025
57bbe70
add joining opt in modal hooks
adrastaea Aug 26, 2025
095617e
update JoiningOptInComponent to use qssEndPoint prop
adrastaea Aug 26, 2025
3871321
Merge remote-tracking branch 'origin/develop' into feat/2911-joining-…
adrastaea Aug 26, 2025
6be6663
make invitationCodes a single object instead of a record
adrastaea Aug 26, 2025
5e1888e
update changelog
adrastaea Aug 26, 2025
ea95c83
rm endpoint hardcode
adrastaea Aug 27, 2025
1fe8bb9
Merge remote-tracking branch 'origin/2910-mobile-ui-qss-opt-in' into …
adrastaea Aug 27, 2025
a182d29
Merge remote-tracking branch 'origin/feat/2910-ui-qss-opt-in' into fe…
adrastaea Aug 27, 2025
3bbf601
fix environment variable passthrough on mobile
adrastaea Aug 28, 2025
a7678d8
default to production env
adrastaea Aug 28, 2025
912d7cb
update package json
adrastaea Aug 28, 2025
3d3a1c3
populate BuildConfig from .env
adrastaea Aug 29, 2025
0920819
add feature flags to other envs
adrastaea Sep 2, 2025
07149ec
set QSS_ALLOWED in qss e2e test
adrastaea Sep 2, 2025
a75b496
fix environment variables on desktop
adrastaea Sep 3, 2025
354e1bc
restore old name
adrastaea Sep 3, 2025
fe87279
fix test failures
adrastaea Sep 3, 2025
e0d022f
fix e2e test
adrastaea Sep 3, 2025
60544f6
set renderer to open true
adrastaea Sep 4, 2025
8d8f16e
remove redundant env var system
adrastaea Sep 4, 2025
986a131
Merge branch 'feat/2910-server-opt-in' into feat/2911-joining-user-qs…
adrastaea Sep 4, 2025
004383e
add mobile drawer
adrastaea Sep 5, 2025
9f9fb24
make opt in drawer agnostic
adrastaea Sep 5, 2025
9f6f13b
handle negative option better
adrastaea Sep 9, 2025
cc6271f
fix closing drawer accidentally advancing to username screen
adrastaea Sep 10, 2025
3574240
go back to join screen if username registration is abandoned
adrastaea Sep 10, 2025
4dd9c72
remove websocket connection abort
adrastaea Sep 10, 2025
9bc8809
remove debug kruft
adrastaea Sep 10, 2025
6f17589
revert submodule change
adrastaea Sep 10, 2025
fca6ac2
add tos checkbox
adrastaea Sep 10, 2025
1807330
use screen instead of drawer; fix join aborts
adrastaea Sep 12, 2025
55a622d
move tos to end of onboarding
adrastaea Sep 16, 2025
a3bcef7
fix join community modal not closing with nav
adrastaea Sep 16, 2025
a757f8b
fix tos popping back up after loading; remove prev component
adrastaea Sep 16, 2025
69d85ab
add reject button to tos screen
adrastaea Sep 16, 2025
815e615
remove old drawer
adrastaea Sep 16, 2025
e7240bb
fix desktop tests; handle custom protocol; fix aborted onboards;
adrastaea Sep 17, 2025
2536134
fix state-manager tests
adrastaea Sep 17, 2025
96ee32d
update mobile snapshots
adrastaea Sep 18, 2025
445ceea
fix e2e qss_enabled injection
adrastaea Sep 18, 2025
311d3f5
update multiple clients qss test with updated flow
adrastaea Sep 18, 2025
b666139
add qss onboarding test
adrastaea Sep 18, 2025
5a68f69
Merge branch 'develop' into feat/2911-joining-user-qss-optin-ui
adrastaea Sep 18, 2025
d78d289
restore previous qss sign-in error throwing
adrastaea Sep 18, 2025
d904e5b
add qss onboarding rtl test
adrastaea Sep 18, 2025
4532405
fix mobile tos flow on creation
adrastaea Sep 18, 2025
8c57e62
fix overly redundant env var settings
adrastaea Sep 19, 2025
cc8ffe3
update actions to use appropriate ENVFILE
adrastaea Sep 19, 2025
cc1c9f2
remove outdated desktop scripts
adrastaea Sep 19, 2025
ffb00d2
bring back pullLibs for linux; add oneClient qss test
adrastaea Sep 19, 2025
29a2259
Merge branch 'develop' into feat/2911-joining-user-qss-optin-ui
adrastaea Sep 19, 2025
67d0815
use npm scripts in linux builds
adrastaea Sep 19, 2025
2ec4c16
add qss onboarding flow test
adrastaea Sep 22, 2025
7297ebd
Merge remote-tracking branch 'origin/develop' into feat/2911-joining-…
adrastaea Sep 23, 2025
52d3b8a
Merge branch 'develop' into feat/2911-joining-user-qss-optin-ui
adrastaea Sep 25, 2025
3486542
add UI, socket events, and display hooks
adrastaea Sep 26, 2025
e281711
Implement server addition and community update handling in socket ser…
adrastaea Oct 1, 2025
4207bc6
Merge remote-tracking branch 'origin/develop' into feat/2907-warn-on-…
adrastaea Oct 1, 2025
51a06c4
fix merge conflict
adrastaea Oct 1, 2025
e836457
handle special cases
adrastaea Oct 8, 2025
7edcf61
add community param
adrastaea Oct 8, 2025
ea67e13
rm debug kruft
adrastaea Oct 8, 2025
edbdc7a
Merge branch 'develop' into feat/2907-warn-on-unexpected-server
adrastaea Oct 8, 2025
ad89ea1
rm unused imports; fix tests in backend and sm; fix merge conflicts
adrastaea Oct 8, 2025
774057f
fix rtl test, add debug trigger, make mobile tos and warning modal fi…
adrastaea Oct 9, 2025
b218afe
rm deprecated and unused typeface package that was breaking tests
adrastaea Oct 13, 2025
be8aff1
fix leaving and recreating community
adrastaea Oct 14, 2025
085ea52
Merge remote-tracking branch 'origin/develop' into feat/2907-warn-on-…
adrastaea Oct 14, 2025
93d98c7
Merge remote-tracking branch 'origin/develop' into feat/2907-warn-on-…
adrastaea Oct 14, 2025
1b5bc42
update changelog
adrastaea Oct 14, 2025
26456e2
Merge branch 'develop' into feat/2907-warn-on-unexpected-server
islathehut Nov 10, 2025
6d9174c
Updates to work with reconnect logic
islathehut Nov 11, 2025
0896ffe
Merge remote-tracking branch 'origin/develop' into feat/2907-warn-on-…
adrastaea Nov 19, 2025
5835663
Merge branch 'develop' into feat/2907-warn-on-unexpected-server
adrastaea Nov 19, 2025
41222c7
Merge origin/develop into feat/2907-warn-on-unexpected-server
adrastaea Jun 17, 2026
58cfa0a
Merge remote-tracking branch 'origin/develop' into feat/2907-warn-on-…
adrastaea Jul 2, 2026
d2eade2
Fix QSS TOS CI failures
adrastaea Jul 2, 2026
c5b3708
Merge remote-tracking branch 'origin/develop' into feat/2907-warn-on-…
adrastaea Jul 17, 2026
59351be
feat: implement server acceptance flow and ToS handling in community …
adrastaea Jul 17, 2026
0fa37bb
feat: add debug server handling and warning for unknown servers
adrastaea Jul 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
### Features

* Adds hcaptcha verification for protected QSS actions [#2908](https://github.com/TryQuiet/quiet/issues/2908)
* Added warning popup when a server was unexpectedly added to chain [#2907](https://github.com/TryQuiet/quiet/issues/2907)
* Messages can now be relayed using QSS [#2805](https://github.com/TryQuiet/quiet/issues/2805)
* Messages can be retrieved from QSS stores [#2806](https://github.com/TryQuiet/quiet/issues/2806)
* Profile photos are now uploaded via IPFS [#3048](https://github.com/TryQuiet/quiet/issues/3048)
Expand Down
29 changes: 26 additions & 3 deletions packages/backend/src/nest/auth/sigchain.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { KeyMetadata } from '@localfirst/crdx'
import { LocalDbService } from '../local-db/local-db.service'
import { createLogger } from '../common/logger'
import { SocketEvents, StorableKey } from '@quiet/types'
import { SocketEvents, StorableKey, type User } from '@quiet/types'
import { type RoleService } from './services/roles/role.service'
import { type DeviceService } from './services/members/device.service'
import { type InviteService } from './services/invites/invite.service'
Expand Down Expand Up @@ -144,8 +144,17 @@ export class SigChainService extends EventEmitter {
}

private handleChainUpdate = async (teamId: string) => {
this.saveChain(teamId)
this.logger.info('Chain updated, emitted updated event')
const chain = this.getChain(teamId, false)
if (chain?.team != null) {
const users = chain.team.members().map(user => ({
userId: user.userId,
roles: user.roles,
isRegistered: true,
isDuplicated: false,
})) as User[]
this.serverIoProvider.io.emit(SocketEvents.USERS_UPDATED, { users })
}

void this._updateKeysOnChainUpdate(teamId).catch(err => {
this.logger.error('Failed to update iOS keychain on chain update', err)
})
Expand All @@ -155,6 +164,20 @@ export class SigChainService extends EventEmitter {
})
this.emit(SigchainEvents.UPDATED, teamId)
this.logger.info('Chain updated, emitted updated event')

if (chain?.team != null) {
const community = await this.localDbService.getCurrentCommunity()
if (community) {
const teamServerHosts = chain.team.servers().map(s => s.host)
const communityHostsSet = new Set(community.serverHosts?.map(sh => sh.hostUrl) || [])
const teamHostsSet = new Set(teamServerHosts)
const setsAreEqual =
communityHostsSet.size === teamHostsSet.size && [...communityHostsSet].every(h => teamHostsSet.has(h))
if (!setsAreEqual && teamServerHosts.length > 0) {
this.serverIoProvider.io.emit(SocketEvents.SERVER_ADDED, { id: community.id, serverHosts: teamServerHosts })
}
}
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import fs from 'fs'
import path from 'path'
import { Test, TestingModule } from '@nestjs/testing'
import { getReduxStoreFactory, prepareStore, type Store } from '@quiet/state-manager'
import { CommunityOwnership, SocketActions, type Community, type Identity } from '@quiet/types'
import { CommunityOwnership, SocketActions, SocketEvents, type Community, type Identity } from '@quiet/types'
import { type FactoryGirl } from 'factory-girl'
import { TestModule } from '../common/test.module'
import { removeFilesFromDir } from '../common/utils'
Expand Down Expand Up @@ -630,4 +630,71 @@ describe('ConnectionsManagerService', () => {
expect(leaveCommunitySpy).toHaveBeenCalledTimes(1)
expect(callback).toHaveBeenCalledWith(false)
})

it('adds a debug server to the sigchain while marking it as known locally', async () => {
const originalIsE2E = process.env.IS_E2E
process.env.IS_E2E = 'true'
const serverHost = 'unknown-server.example.com'

try {
await localDbService.setCommunity({ ...community, serverHosts: [] })
await localDbService.setCurrentCommunityId(community.id)
await sigChainService.loadChain(community.teamId, true)
connectionsManagerService['attachSocketServiceListeners']()
const emitSpy = jest.spyOn(connectionsManagerService.serverIoProvider.io, 'emit')

connectionsManagerService['socketService'].emit(SocketActions.DEBUG_ADD_SERVER, {
serverHosts: [serverHost],
})

await waitForExpect(async () => {
expect(sigChainService.activeChain.team?.hasServer(serverHost)).toBe(true)
expect(await localDbService.getCommunity(community.id)).toMatchObject({
serverHosts: [{ hostUrl: serverHost, accepted: true }],
})
expect(emitSpy).toHaveBeenCalledWith(SocketEvents.COMMUNITY_UPDATED, {
id: community.id,
updates: { serverHosts: [{ hostUrl: serverHost, accepted: true }] },
})
})
} finally {
if (originalIsE2E == null) {
delete process.env.IS_E2E
} else {
process.env.IS_E2E = originalIsE2E
}
}
})

it('persists ToS and starts QSS when an unexpected server is accepted', async () => {
const qssEndpoint = 'wss://qss.example.com'
await localDbService.setCommunity({
...community,
qssEnabled: false,
tosAccepted: false,
qssEndpoint,
serverHosts: [{ hostUrl: 'qss.example.com', accepted: false }],
})
await localDbService.setCurrentCommunityId(community.id)
await connectionsManagerService.init()
const connectSpy = jest.spyOn(qssService, 'connect').mockResolvedValue(QSSOperationResult.SUCCESS)

connectionsManagerService['socketService'].emit(SocketActions.UPDATE_COMMUNITY, {
id: community.id,
updates: {
qssEnabled: true,
tosAccepted: true,
serverHosts: [{ hostUrl: 'qss.example.com', accepted: true }],
},
})

await waitForExpect(async () => {
expect(await localDbService.getCommunity(community.id)).toMatchObject({
qssEnabled: true,
tosAccepted: true,
serverHosts: [{ hostUrl: 'qss.example.com', accepted: true }],
})
expect(connectSpy).toHaveBeenCalledWith(qssEndpoint)
})
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { EventEmitter } from 'events'
import getPort from 'get-port'
import { Agent } from 'https'
import { CryptoEngine, setEngine } from 'pkijs'
import * as url from 'node:url'
import { createPeerId, generateLibp2pPSK } from '../common/utils'

import { createLibp2pAddress, isPSKcodeValid } from '@quiet/common'
Expand Down Expand Up @@ -49,13 +50,15 @@ import {
DeleteChannelPayload,
SetUserProfilePayload,
SetUserProfileResponse,
ServerHost,
AddMembersChannelPayload,
AddMembersChannelResponse,
PublicChannel,
User,
UserProfilesUpdatedPayload,
UpdateCommunityPayload,
ChannelOperationStatus,
DebugAddServerPayload,
} from '@quiet/types'
import { CONFIG_OPTIONS, QSS_ALLOWED, QSS_ENDPOINT, SERVER_IO_PROVIDER, SOCKS_PROXY_AGENT } from '../const'
import { Libp2pService, Libp2pState } from '../libp2p/libp2p.service'
Expand All @@ -81,6 +84,7 @@ import { SigchainEvents } from '../auth/types'
import { QPSService } from '../qps/qps.service'
import { CaptchaService } from '../captcha/captcha.service'
import { SigChain } from '../auth/sigchain'
import { createKeyset, redactKeys, type Server } from '@localfirst/auth'

/**
* A monolith service that handles lots of events received from the state-manager.
Expand Down Expand Up @@ -637,7 +641,7 @@ export class ConnectionsManagerService extends EventEmitter implements OnModuleI
psk: generateLibp2pPSK().psk,
ownership: CommunityOwnership.Owner,
teamId: sigchain.teamId!,
qssEnabled: this.qssAllowed && payload.useServer,
qssEnabled: this.qssAllowed && payload.useServer && payload.tosAccepted,
qssEndpoint: this.qssEndpoint,
tosAccepted: payload.tosAccepted,
}
Expand Down Expand Up @@ -736,6 +740,19 @@ export class ConnectionsManagerService extends EventEmitter implements OnModuleI
ownership: CommunityOwnership.User,
qssEnabled: inviteData.version === InvitationDataVersion.v5 ? inviteData.qssEnabled : undefined,
qssEndpoint: inviteData.version === InvitationDataVersion.v5 ? inviteData.qssEndpoint : undefined,
tosAccepted: payload.tosAccepted,
}

if (community.qssEnabled && payload.tosAccepted && community.qssEndpoint) {
if (this.qssEndpoint) {
let host = url.parse(this.qssEndpoint).hostname
if (host === '127.0.0.1') {
host = 'localhost'
}
if (host) {
community.serverHosts = [{ hostUrl: host, accepted: true } as ServerHost]
}
}
}

await this.localDbService.setCommunity(community)
Expand Down Expand Up @@ -1066,6 +1083,32 @@ export class ConnectionsManagerService extends EventEmitter implements OnModuleI
}
})

this.socketService.on(SocketActions.UPDATE_COMMUNITY, async (payload: UpdateCommunityPayload) => {
this.logger.info(`socketService - ${SocketActions.UPDATE_COMMUNITY}`)
const community = await this.localDbService.getCommunity(payload.id)
if (!community) {
this.logger.error(`No community found with id ${payload.id}`)
return
}
const updatedCommunity = { ...community, ...payload.updates }
await this.localDbService.setCommunity(updatedCommunity)

const qssBecameUsable =
updatedCommunity.qssEnabled && updatedCommunity.tosAccepted && (!community.qssEnabled || !community.tosAccepted)
if (qssBecameUsable) {
await this.qssService.connect(updatedCommunity.qssEndpoint)
}
})

this.socketService.on(SocketActions.DEBUG_ADD_SERVER, async (payload: DebugAddServerPayload) => {
this.logger.info(`socketService - ${SocketActions.DEBUG_ADD_SERVER}`)
try {
await this.debugAddServer(payload)
} catch (e) {
this.logger.error('Error while adding a debug server', e)
}
})

// Local First Auth

this.socketService.on(
Expand Down Expand Up @@ -1205,6 +1248,53 @@ export class ConnectionsManagerService extends EventEmitter implements OnModuleI
})
}

private async debugAddServer(payload: DebugAddServerPayload): Promise<void> {
if (process.env.NODE_ENV !== 'development' && process.env.IS_E2E !== 'true') {
this.logger.warn('Ignoring debug server request outside development and E2E')
return
}

const community = await this.localDbService.getCurrentCommunity()
if (!community) {
this.logger.warn('No active community found for debug server request')
return
}

const sigChain = this.sigChainService.getActiveChain(false)
if (!sigChain?.team || sigChain.teamId !== community.teamId) {
this.logger.warn(`No active sigchain found for community ${community.id}`)
return
}

const serverHosts = [...new Set(payload.serverHosts.map(host => host.trim()).filter(Boolean))]
if (serverHosts.length === 0) {
return
}

const knownHosts = new Map(community.serverHosts?.map(server => [server.hostUrl, server]) ?? [])
for (const hostUrl of serverHosts) {
knownHosts.set(hostUrl, { hostUrl, accepted: true })
}
const updatedServerHosts = [...knownHosts.values()]

await this.localDbService.setCommunity({ ...community, serverHosts: updatedServerHosts })
this.serverIoProvider.io.emit(SocketEvents.COMMUNITY_UPDATED, {
id: community.id,
updates: { serverHosts: updatedServerHosts },
})

for (const host of serverHosts) {
if (sigChain.team.hasServer(host)) {
continue
}
const server: Server = {
host,
keys: redactKeys(createKeyset({ type: 'SERVER', name: host })),
}
sigChain.server.addServer(server)
}
}

/**
* Handle events from the sigchain service and update data in the state manager
*/
Expand Down
6 changes: 4 additions & 2 deletions packages/backend/src/nest/qss/qss-sync-manager.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@ export class QSSSyncManager implements OnModuleDestroy, OnModuleInit {
communityInitialized: false,
qssEnabled: false,
qssSetup: false,
tosAccepted: false,
community,
}
if (community == null) {
Expand All @@ -994,8 +995,9 @@ export class QSSSyncManager implements OnModuleDestroy, OnModuleInit {

return {
...status,
qssEnabled: (community as any).qssEnabled ?? false,
qssSetup: (community as any).qssSetup ?? false,
qssEnabled: community.qssEnabled ?? false,
qssSetup: community.qssSetup ?? false,
tosAccepted: community.tosAccepted ?? false,
communityInitialized: true,
}
}
Expand Down
28 changes: 21 additions & 7 deletions packages/backend/src/nest/qss/qss.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,16 @@ describe('QSSService', () => {
})

interface InitCommunitySettings {
qssEnabled: boolean
qssSetup: boolean
qssEnabled?: boolean
qssSetup?: boolean
tosAccepted?: boolean
}
const initCommunity = async (
settings: InitCommunitySettings = { qssEnabled: true, qssSetup: false }
): Promise<Community> => {
const initCommunity = async (settings: InitCommunitySettings = {}): Promise<Community> => {
await localDbService.setCommunity({
...community,
qssEnabled: true,
qssSetup: false,
tosAccepted: true,
...settings,
})
await localDbService.setCurrentCommunityId(community.id)
Expand Down Expand Up @@ -312,6 +314,14 @@ describe('QSSService', () => {
expect(qssService.canConnect).toBeFalsy()
})

it(`doesn't connect to QSS when enabled but TOS isn't accepted`, async () => {
await initCommunity({ tosAccepted: false, qssEnabled: true, qssSetup: false })
mockedAllowed = jest.spyOn(qssService, 'qssAllowed', 'get').mockReturnValue(true)
await qssService.connect('ws://localhost:3000')
expect(qssService.connected).toBeFalsy()
expect(qssService.canConnect).toBeTruthy()
})

it('reconnects when the requested QSS endpoint changes', async () => {
await initCommunity()
mockedAllowed = jest.spyOn(qssService, 'qssAllowed', 'get').mockReturnValue(true)
Expand Down Expand Up @@ -815,6 +825,7 @@ describe('QSSService', () => {
...community,
teamId: 'team-id',
qssEnabled: true,
tosAccepted: true,
})
await localDbService.setCurrentCommunityId(community.id)
await localDbService.setIdentity(userIdentity)
Expand Down Expand Up @@ -844,6 +855,7 @@ describe('QSSService', () => {
...community,
teamId: 'team-id',
qssEnabled: true,
tosAccepted: true,
})
await localDbService.setCurrentCommunityId(community.id)
await localDbService.setIdentity(userIdentity)
Expand Down Expand Up @@ -873,6 +885,7 @@ describe('QSSService', () => {
...community,
teamId: 'team-id',
qssEnabled: true,
tosAccepted: true,
})
await localDbService.setCurrentCommunityId(community.id)
await localDbService.setIdentity(userIdentity)
Expand Down Expand Up @@ -903,6 +916,7 @@ describe('QSSService', () => {
...community,
teamId: 'team-id',
qssEnabled: true,
tosAccepted: true,
})
await localDbService.setCurrentCommunityId(community.id)
await localDbService.setIdentity(userIdentity)
Expand Down Expand Up @@ -1034,7 +1048,7 @@ describe('QSSService', () => {

describe('sendLogEntrySyncMessage', () => {
it(`sends a successful log sync to QSS`, async () => {
await initCommunity({ qssEnabled: true, qssSetup: true })
await initCommunity({ qssEnabled: true, qssSetup: true, tosAccepted: true })
const initStatusOrig = await qssService.getQssInitStatus()
expect(initStatusOrig.qssSetup).toBeTruthy()
const syncSeq = 41
Expand Down Expand Up @@ -1282,7 +1296,7 @@ describe('QSSService', () => {
})

it(`fails to send log sync to QSS and writes pending message to local DB`, async () => {
await initCommunity({ qssEnabled: true, qssSetup: true })
await initCommunity({ qssEnabled: true, qssSetup: true, tosAccepted: true })
const initStatusOrig = await qssService.getQssInitStatus()
expect(initStatusOrig.qssSetup).toBeTruthy()

Expand Down
Loading
Loading