Skip to content

Conversation

@pm-McFly
Copy link
Collaborator

No description provided.

MontaGhanmy and others added 12 commits October 17, 2025 14:39
Signed-off-by: Pierre 'McFly' Marty <[email protected]>
- Resolve feature flags once in constructor to avoid env lookup per request
- Validate optional viewer identifier with getLocalPart
- Replace O(N) contact check with Set for O(1) lookup
- Preserve original error stack using error cause
- Use Object.assign for language/timezone merge
- Minor optional chaining and nullish coalescing clean‑ups

Signed-off-by: Pierre 'McFly' Marty <[email protected]>
- Fire matrix, directory and common‑settings queries concurrently using Promise.all.
- Preserve original behaviour (early‑return when matrix data missing and additional features disabled).
- Minor cleanup: use Object.assign for language/timezone merge and reuse the existing feature‑flag checks.

Signed-off-by: Pierre 'McFly' Marty <[email protected]>
- Add four new tests covering:
  * Missing Matrix profile with `additional_features` enabled (fallback to LDAP).
  * Missing Matrix profile with `additional_features` disabled (returns null).
  * Presence/absence of `language` and `timezone` based on the
    `common_settings` feature flag.

Signed-off-by: Pierre 'McFly' Marty <[email protected]>
- Extend integration tests to verify normal controller behavior.
- Add unit tests that exercise additional branches:
  • get() returns 400 when auth userId is missing.
  • get() returns 403 when the service throws ForbiddenError.
  • updateVisibility() returns 403 when path userId differs from auth userId.
  • updateVisibility() returns 500 when service returns undefined.
- Use lightweight request/response mocks to isolate controller logic.
- Ensure mocks are reset before each test.

Signed-off-by: Pierre 'McFly' Marty <[email protected]>
@nx-cloud
Copy link

nx-cloud bot commented Oct 22, 2025

View your CI Pipeline Execution ↗ for commit 15bf0fa

Command Status Duration Result
lerna run test ✅ Succeeded 1s View ↗
lerna run build ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2025-10-23 15:24:49 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants