Compare commits

..

55 Commits

Author SHA1 Message Date
renovate[bot]
56b5f2845d Update dependency @vector-im/compound-design-tokens to v1.6.1 (#2487)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-19 13:33:24 +02:00
Timo
afee9eaa26 Don't update mute when reaching the user count threshold. (#2474)
* Dont update mute during call.
2024-07-18 18:14:29 +02:00
Timo
d53ad9a8f3 Update sample config with livekit (rebase on livekit) (#2483)
* Update sample cfg with livekit config

* matching ports in readme and example

---------

Co-authored-by: xmj <xmj@chaot.net>
2024-07-18 16:01:10 +02:00
Robin
d8634eed3d Merge pull request #2484 from element-hq/renovate/react-i18next-15.x
Update dependency react-i18next to v15
2024-07-17 13:14:11 -04:00
renovate[bot]
be4b70c1e1 Update dependency react-i18next to v15 2024-07-17 16:51:55 +00:00
renovate[bot]
e79cded57f Update all non-major dependencies (#2479)
* Update all non-major dependencies

* prettier fixes

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Timo <toger5@hotmail.de>
2024-07-17 10:07:26 +02:00
Robin
486430d1f0 Merge pull request #2478 from element-hq/renovate/compound
Update dependency @vector-im/compound-design-tokens to v1.6.0
2024-07-12 14:19:29 -04:00
renovate[bot]
e6ddf40b1b Update dependency @vector-im/compound-design-tokens to v1.6.0 2024-07-12 16:55:33 +00:00
fkwp
9f521a79f7 Merge pull request #2477 from element-hq/renovate/livekit-client
Update dependency livekit-client to v2.3.2
2024-07-11 10:22:54 +02:00
fkwp
83784a717a Merge pull request #2476 from element-hq/renovate/livekit-components
Update dependency @livekit/components-react to v2.3.6
2024-07-11 10:22:18 +02:00
renovate[bot]
0729deee79 Update dependency livekit-client to v2.3.2 2024-07-11 08:18:46 +00:00
renovate[bot]
77c3114cf8 Update dependency @livekit/components-react to v2.3.6 2024-07-11 08:18:27 +00:00
Robin
82a56c8204 Merge pull request #2471 from element-hq/renovate/major-vitest-monorepo
Update dependency vitest to v2
2024-07-09 10:42:23 -04:00
renovate[bot]
b39896d8c6 Update dependency @vector-im/compound-design-tokens to v1.4.0 (#2472)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-09 11:34:44 +02:00
renovate[bot]
79b3fdb645 Update dependency vitest to v2 2024-07-08 13:01:11 +00:00
renovate[bot]
0f877cd021 Update dependency tinyqueue to v3 (#2468)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-08 09:12:26 +02:00
renovate[bot]
db2acc75b2 Update LiveKit components (#2469)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-08 09:11:56 +02:00
renovate[bot]
a5dbfbf2c1 Update all non-major dependencies (#2470)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-08 09:11:25 +02:00
Andrew Ferrazzutti
34c7d02de2 Add config to send session membership state events (#2460)
If not set, legacy call membership state events are sent instead.
Even if set, legacy events are sent in rooms with active legacy calls.

---------

Co-authored-by: Timo <16718859+toger5@users.noreply.github.com>
2024-07-05 21:10:16 +09:00
Andrew Ferrazzutti
ca45067158 Let Element Call widget set session memberships (#2459)
Make Element Call widgets request permission to set device-specific
session membership state events.
2024-07-05 04:59:48 +09:00
Andrew Ferrazzutti
5a6eb7c573 Make widgets request the room creation event (#2457)
This allows the widget to check the room version, so it can know about
version-specific auth rules (namely MSC3779).
2024-07-05 04:57:45 +09:00
Robin
5ad2a27a92 Merge pull request #2462 from element-hq/renovate/github-actions
Update docker/build-push-action action to v6.3.0
2024-07-03 15:25:13 -04:00
renovate[bot]
68daaa45f9 Update docker/build-push-action action to v6.3.0 2024-07-03 11:29:17 +00:00
renovate[bot]
c40ea35937 Update all non-major dependencies (#2461)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-02 10:41:19 +02:00
Timo
d27f433175 Skip error screen for the issue, that the homeserver does not support the room summary endpoint. (#2453)
* Add try inner try block to the room summary fetching and only throw after fetching and a "blind join" fails.
(blind join: call room.join without knowing if the room is public)

Co-authored-by: Robin <robin@robin.town>

---------

Co-authored-by: Robin <robin@robin.town>
2024-06-25 08:44:02 +00:00
Robin
8a6101cd14 Merge pull request #2456 from element-hq/renovate/all-minor-patch
Update all non-major dependencies
2024-06-24 10:37:18 -04:00
Robin
4db7c2bc68 Fix type errors 2024-06-24 10:31:50 -04:00
renovate[bot]
18740fc686 Update all non-major dependencies 2024-06-24 13:04:28 +00:00
Robin
0c39398493 Merge pull request #2447 from element-hq/renovate/compound
Update dependency @vector-im/compound-design-tokens to v1.3.0
2024-06-21 10:39:03 -04:00
Robin
949145f04b Merge pull request #2446 from element-hq/renovate/major-testing-library-monorepo
Update dependency @testing-library/react to v16
2024-06-21 10:32:30 -04:00
Robin
8578dcadf2 Add missing peer dependencies 2024-06-21 10:30:39 -04:00
renovate[bot]
959db44eca Update dependency @testing-library/react to v16 2024-06-21 10:30:28 -04:00
Robin
a031c0e128 Merge pull request #2445 from element-hq/renovate/major-sentry-javascript-monorepo
Update dependency @sentry/react to v8
2024-06-21 10:25:04 -04:00
Robin
591833505f Adapt to breaking changes 2024-06-21 10:23:30 -04:00
Robin
f7ad5074d8 Merge pull request #2452 from element-hq/renovate/i18next-parser-9.x
Update dependency i18next-parser to v9
2024-06-21 10:14:39 -04:00
Robin
e0aef74bf5 Merge pull request #2454 from element-hq/renovate/uuid-10.x
Update dependency uuid to v10
2024-06-21 10:13:01 -04:00
renovate[bot]
b2378bf899 Update dependency i18next-parser to v9 2024-06-21 14:12:34 +00:00
Robin
255f6b1814 Merge pull request #2451 from element-hq/renovate/i18next-browser-languagedetector-8.x
Update dependency i18next-browser-languagedetector to v8
2024-06-21 10:11:59 -04:00
Robin
4c491b5363 Merge pull request #2450 from element-hq/renovate/eslint-plugin-unicorn-54.x
Update dependency eslint-plugin-unicorn to v54
2024-06-21 10:11:23 -04:00
Robin
61c808d4cf Merge pull request #2455 from element-hq/renovate/github-actions
Pin dependencies
2024-06-21 10:00:40 -04:00
Robin
13ef3183e2 Tell Renovate that we're trying to pin actions to specific tags
It thought that we were just trying to follow the latest commit on these actions, when in reality we want to follow the latest tag and pin its commit hash.
2024-06-21 09:57:48 -04:00
renovate[bot]
afd4fdcea2 Pin dependencies 2024-06-21 13:21:08 +00:00
Robin
982181ccd4 Merge pull request #2444 from robintown/more-renovate
Refine Renovate config further
2024-06-21 09:10:16 -04:00
renovate[bot]
30629ebba2 Update dependency uuid to v10 2024-06-21 10:07:33 +00:00
renovate[bot]
7f6a32d21a Update dependency i18next-browser-languagedetector to v8 2024-06-21 08:46:24 +00:00
renovate[bot]
320ade0a50 Update dependency eslint-plugin-unicorn to v54 2024-06-21 04:03:53 +00:00
renovate[bot]
8c6fee3150 Update dependency @vector-im/compound-design-tokens to v1.3.0 2024-06-21 00:35:09 +00:00
renovate[bot]
5c6acaf915 Update dependency @sentry/react to v8 2024-06-20 21:46:07 +00:00
Robin
c46549b2b6 Refine Renovate config further
By getting it to pin GitHub Actions to specific commits, which hardens our workflows, and fixing a warning about matchPackageNames
2024-06-20 16:00:52 -04:00
fkwp
97a58f6db7 Merge pull request #2442 from element-hq/renovate/docker-build-push-action-digest
Update docker/build-push-action digest to 31159d4
2024-06-20 21:48:42 +02:00
fkwp
b6288579c9 Merge pull request #2443 from element-hq/renovate/docker-setup-buildx-action-digest
Update docker/setup-buildx-action digest to abe89fb
2024-06-20 21:48:25 +02:00
renovate[bot]
44bf987cdc Update docker/setup-buildx-action digest to abe89fb 2024-06-20 19:45:16 +00:00
renovate[bot]
a7d55824bb Update docker/build-push-action digest to 31159d4 2024-06-20 19:45:13 +00:00
Robin
8fa038c61f Merge pull request #2441 from robintown/renovate-noise
Reduce noise coming from Renovate updates
2024-06-20 15:44:38 -04:00
Robin
869d9b43cb Reduce noise coming from Renovate updates
What I've tried to do here is to group most dependency updates together and put them on a weekly schedule. Some of our more sensitive dependencies such as LiveKit and Compound have been put into separate groups, so we still receive frequent updates for them.
2024-06-20 15:43:21 -04:00
28 changed files with 2393 additions and 2170 deletions

View File

@@ -23,10 +23,10 @@ jobs:
packages: write packages: write
steps: steps:
- name: Check it out - name: Check it out
uses: actions/checkout@v4 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: 📥 Download artifact - name: 📥 Download artifact
uses: actions/download-artifact@v4 uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ inputs.artifact_run_id }} run-id: ${{ inputs.artifact_run_id }}
@@ -34,7 +34,7 @@ jobs:
path: dist path: dist
- name: Log in to container registry - name: Log in to container registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ github.actor }}
@@ -42,16 +42,16 @@ jobs:
- name: Extract metadata (tags, labels) for Docker - name: Extract metadata (tags, labels) for Docker
id: meta id: meta
uses: docker/metadata-action@f7b4ed12385588c3f9bc252f0a2b520d83b52d48 uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: ${{ inputs.docker_tags}} tags: ${{ inputs.docker_tags}}
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@5138f76647652447004da686b2411557eaf65f33 uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@f6010ea70151369b06f0194be1051fbbdff851b2 uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0
with: with:
context: . context: .
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64

View File

@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out test private repo - name: Check out test private repo
uses: actions/checkout@v4 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with: with:
repository: element-hq/static-call-participant repository: element-hq/static-call-participant
ref: refs/heads/main ref: refs/heads/main

View File

@@ -21,9 +21,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Yarn cache - name: Yarn cache
uses: actions/setup-node@v4 uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with: with:
cache: "yarn" cache: "yarn"
- name: Install dependencies - name: Install dependencies
@@ -38,7 +38,7 @@ jobs:
VITE_APP_VERSION: ${{ inputs.vite_app_version }} VITE_APP_VERSION: ${{ inputs.vite_app_version }}
NODE_OPTIONS: "--max-old-space-size=4096" NODE_OPTIONS: "--max-old-space-size=4096"
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
with: with:
name: build-output name: build-output
path: dist path: dist

View File

@@ -7,9 +7,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Yarn cache - name: Yarn cache
uses: actions/setup-node@v4 uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with: with:
cache: "yarn" cache: "yarn"
- name: Install dependencies - name: Install dependencies

View File

@@ -34,7 +34,7 @@ jobs:
environment: Netlify environment: Netlify
steps: steps:
- name: 📝 Create Deployment - name: 📝 Create Deployment
uses: bobheadxi/deployments@v1 uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1
id: deployment id: deployment
with: with:
step: start step: start
@@ -46,7 +46,7 @@ jobs:
Exercise caution. Use test accounts. Exercise caution. Use test accounts.
- name: 📥 Download artifact - name: 📥 Download artifact
uses: actions/download-artifact@v4 uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4
with: with:
github-token: ${{ secrets.ELEMENT_BOT_TOKEN }} github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
run-id: ${{ inputs.artifact_run_id }} run-id: ${{ inputs.artifact_run_id }}
@@ -62,7 +62,7 @@ jobs:
- name: ☁️ Deploy to Netlify - name: ☁️ Deploy to Netlify
id: netlify id: netlify
uses: nwtgck/actions-netlify@v3.0 uses: nwtgck/actions-netlify@4cbaf4c08f1a7bfa537d6113472ef4424e4eb654 # v3.0
with: with:
publish-dir: webapp publish-dir: webapp
deploy-message: "Deploy from GitHub Actions" deploy-message: "Deploy from GitHub Actions"
@@ -73,7 +73,7 @@ jobs:
timeout-minutes: 1 timeout-minutes: 1
- name: 🚦 Update deployment status - name: 🚦 Update deployment status
uses: bobheadxi/deployments@v1 uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1
if: always() if: always()
with: with:
step: finish step: finish

View File

@@ -14,7 +14,7 @@ jobs:
pr_data_json: ${{ steps.prdetails.outputs.data }} pr_data_json: ${{ steps.prdetails.outputs.data }}
steps: steps:
- id: prdetails - id: prdetails
uses: matrix-org/pr-details-action@v1.3 uses: matrix-org/pr-details-action@15bde5285d7850ba276cc3bd8a03733e3f24622a # v1.3
continue-on-error: true continue-on-error: true
with: with:
owner: ${{ github.event.workflow_run.head_repository.owner.login }} owner: ${{ github.event.workflow_run.head_repository.owner.login }}

View File

@@ -39,7 +39,7 @@ jobs:
id: current-time id: current-time
run: echo "unix_time=$(date +'%s')" >> $GITHUB_OUTPUT run: echo "unix_time=$(date +'%s')" >> $GITHUB_OUTPUT
- name: 📥 Download artifact - name: 📥 Download artifact
uses: actions/download-artifact@v4 uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id || github.run_id }} run-id: ${{ github.event.workflow_run.id || github.run_id }}
@@ -51,7 +51,7 @@ jobs:
run: | run: |
tar --numeric-owner --transform "s/dist/element-call-${TARBALL_VERSION}/" -cvzf element-call-${TARBALL_VERSION}.tar.gz dist tar --numeric-owner --transform "s/dist/element-call-${TARBALL_VERSION}/" -cvzf element-call-${TARBALL_VERSION}.tar.gz dist
- name: Upload - name: Upload
uses: actions/upload-artifact@552bf3722c16e81001aea7db72d8cedf64eb5f68 uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
env: env:
GITHUB_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}
with: with:

View File

@@ -9,9 +9,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Yarn cache - name: Yarn cache
uses: actions/setup-node@v4 uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with: with:
cache: "yarn" cache: "yarn"
- name: Install dependencies - name: Install dependencies
@@ -19,6 +19,6 @@ jobs:
- name: Vitest - name: Vitest
run: "yarn run test" run: "yarn run test"
- name: Upload to codecov - name: Upload to codecov
uses: codecov/codecov-action@v4 uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4
with: with:
flags: unittests flags: unittests

View File

@@ -13,9 +13,9 @@ jobs:
steps: steps:
- name: Checkout the code - name: Checkout the code
uses: actions/checkout@v4 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with: with:
cache: "yarn" cache: "yarn"
@@ -26,7 +26,7 @@ jobs:
run: "rm -R public/locales" run: "rm -R public/locales"
- name: Download translation files - name: Download translation files
uses: localazy/download@v1.1.0 uses: localazy/download@0a79880fb66150601e3b43606fab69c88123c087 # v1.1.0
with: with:
groups: "-p includeSourceLang:true" groups: "-p includeSourceLang:true"
@@ -38,7 +38,7 @@ jobs:
- name: Create Pull Request - name: Create Pull Request
id: cpr id: cpr
uses: peter-evans/create-pull-request@v6.0.5 uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with: with:
token: ${{ secrets.ELEMENT_BOT_TOKEN }} token: ${{ secrets.ELEMENT_BOT_TOKEN }}
branch: actions/localazy-download branch: actions/localazy-download

View File

@@ -14,9 +14,9 @@ jobs:
steps: steps:
- name: Checkout the code - name: Checkout the code
uses: actions/checkout@v4 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Upload - name: Upload
uses: localazy/upload@v1 uses: localazy/upload@27e6b5c0fddf4551596b42226b1c24124335d24a # v1
with: with:
write_key: ${{ secrets.LOCALAZY_WRITE_KEY }} write_key: ${{ secrets.LOCALAZY_WRITE_KEY }}

View File

@@ -131,7 +131,7 @@ advertises one in the client well-known, this will not be used.)
```json ```json
"livekit": { "livekit": {
"livekit_service_url": "http://localhost:8881" "livekit_service_url": "http://localhost:7881"
}, },
``` ```

View File

@@ -5,5 +5,8 @@
"server_name": "call.ems.host" "server_name": "call.ems.host"
} }
}, },
"livekit": {
"livekit_service_url": "http://localhost:7881"
},
"eula": "https://static.element.io/legal/online-EULA.pdf" "eula": "https://static.element.io/legal/online-EULA.pdf"
} }

View File

@@ -26,9 +26,9 @@
"@opentelemetry/api": "^1.4.0", "@opentelemetry/api": "^1.4.0",
"@opentelemetry/context-zone": "^1.9.1", "@opentelemetry/context-zone": "^1.9.1",
"@opentelemetry/exporter-jaeger": "^1.9.1", "@opentelemetry/exporter-jaeger": "^1.9.1",
"@opentelemetry/exporter-trace-otlp-http": "^0.48.0", "@opentelemetry/exporter-trace-otlp-http": "^0.52.0",
"@opentelemetry/instrumentation-document-load": "^0.38.0", "@opentelemetry/instrumentation-document-load": "^0.39.0",
"@opentelemetry/instrumentation-user-interaction": "^0.38.0", "@opentelemetry/instrumentation-user-interaction": "^0.39.0",
"@opentelemetry/sdk-trace-web": "^1.9.1", "@opentelemetry/sdk-trace-web": "^1.9.1",
"@radix-ui/react-dialog": "^1.0.4", "@radix-ui/react-dialog": "^1.0.4",
"@radix-ui/react-slider": "^1.1.2", "@radix-ui/react-slider": "^1.1.2",
@@ -47,7 +47,7 @@
"@react-stately/select": "^3.1.3", "@react-stately/select": "^3.1.3",
"@react-stately/tooltip": "^3.0.5", "@react-stately/tooltip": "^3.0.5",
"@react-stately/tree": "^3.2.0", "@react-stately/tree": "^3.2.0",
"@sentry/react": "^7.0.0", "@sentry/react": "^8.0.0",
"@sentry/tracing": "^7.0.0", "@sentry/tracing": "^7.0.0",
"@types/lodash": "^4.14.199", "@types/lodash": "^4.14.199",
"@use-gesture/react": "^10.2.11", "@use-gesture/react": "^10.2.11",
@@ -59,7 +59,7 @@
"classnames": "^2.3.1", "classnames": "^2.3.1",
"events": "^3.3.0", "events": "^3.3.0",
"i18next": "^23.0.0", "i18next": "^23.0.0",
"i18next-browser-languagedetector": "^7.0.0", "i18next-browser-languagedetector": "^8.0.0",
"i18next-http-backend": "^2.0.0", "i18next-http-backend": "^2.0.0",
"livekit-client": "^2.0.2", "livekit-client": "^2.0.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
@@ -71,15 +71,15 @@
"posthog-js": "^1.29.0", "posthog-js": "^1.29.0",
"react": "18", "react": "18",
"react-dom": "18", "react-dom": "18",
"react-i18next": "^14.0.0", "react-i18next": "^15.0.0",
"react-router-dom": "^5.2.0", "react-router-dom": "^5.2.0",
"react-use-clipboard": "^1.0.7", "react-use-clipboard": "^1.0.7",
"react-use-measure": "^2.1.1", "react-use-measure": "^2.1.1",
"rxjs": "^7.8.1", "rxjs": "^7.8.1",
"sdp-transform": "^2.14.1", "sdp-transform": "^2.14.1",
"tinyqueue": "^2.0.3", "tinyqueue": "^3.0.0",
"unique-names-generator": "^4.6.0", "unique-names-generator": "^4.6.0",
"uuid": "9", "uuid": "10",
"vaul": "^0.9.0" "vaul": "^0.9.0"
}, },
"devDependencies": { "devDependencies": {
@@ -90,17 +90,19 @@
"@react-spring/rafz": "^9.7.3", "@react-spring/rafz": "^9.7.3",
"@react-types/dialog": "^3.5.5", "@react-types/dialog": "^3.5.5",
"@sentry/vite-plugin": "^2.0.0", "@sentry/vite-plugin": "^2.0.0",
"@testing-library/react": "^14.0.0", "@testing-library/dom": "^10.1.0",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.1", "@testing-library/user-event": "^14.5.1",
"@types/content-type": "^1.1.5", "@types/content-type": "^1.1.5",
"@types/dom-screen-wake-lock": "^1.0.1", "@types/dom-screen-wake-lock": "^1.0.1",
"@types/dompurify": "^3.0.2", "@types/dompurify": "^3.0.2",
"@types/grecaptcha": "^3.0.4", "@types/grecaptcha": "^3.0.4",
"@types/node": "^20.0.0", "@types/node": "^20.0.0",
"@types/react-dom": "^18.3.0",
"@types/react-router-dom": "^5.3.3", "@types/react-router-dom": "^5.3.3",
"@types/request": "^2.48.8", "@types/request": "^2.48.8",
"@types/sdp-transform": "^2.4.5", "@types/sdp-transform": "^2.4.5",
"@types/uuid": "9", "@types/uuid": "10",
"@typescript-eslint/eslint-plugin": "^7.0.0", "@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0", "@typescript-eslint/parser": "^7.0.0",
"babel-loader": "^9.0.0", "babel-loader": "^9.0.0",
@@ -114,8 +116,8 @@
"eslint-plugin-matrix-org": "^1.2.1", "eslint-plugin-matrix-org": "^1.2.1",
"eslint-plugin-react": "^7.29.4", "eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.5.0", "eslint-plugin-react-hooks": "^4.5.0",
"eslint-plugin-unicorn": "^51.0.0", "eslint-plugin-unicorn": "^54.0.0",
"i18next-parser": "^8.0.0", "i18next-parser": "^9.0.0",
"jsdom": "^24.0.0", "jsdom": "^24.0.0",
"prettier": "^3.0.0", "prettier": "^3.0.0",
"sass": "^1.42.1", "sass": "^1.42.1",
@@ -124,6 +126,6 @@
"vite": "^5.0.0", "vite": "^5.0.0",
"vite-plugin-html-template": "^1.1.0", "vite-plugin-html-template": "^1.1.0",
"vite-plugin-svgr": "^4.0.0", "vite-plugin-svgr": "^4.0.0",
"vitest": "^1.2.2" "vitest": "^2.0.0"
} }
} }

View File

@@ -3,9 +3,42 @@
"extends": ["config:base"], "extends": ["config:base"],
"packageRules": [ "packageRules": [
{ {
"description": "Disable renoavte for packages we want to monitor ourselves", "extends": ["group:allNonMajor", "schedule:weekly"]
"matchPackagePatterns": ["matrix-js-sdk"], },
{
"groupName": "GitHub Actions",
"matchDepTypes": ["action"],
"pinDigests": true,
"extends": ["schedule:monthly"]
},
{
"description": "Disable Renovate for packages we want to monitor ourselves",
"groupName": "manually updated packages",
"matchDepNames": ["matrix-js-sdk"],
"enabled": false "enabled": false
},
{
"groupName": "matrix-widget-api",
"matchDepNames": ["matrix-widget-api"]
},
{
"groupName": "Compound",
"matchPackagePrefixes": ["@vector-im/compound-"],
"schedule": "before 5am on Tuesday and Friday"
},
{
"groupName": "LiveKit client",
"matchDepNames": ["livekit-client"]
},
{
"groupName": "LiveKit components",
"matchPackagePrefixes": ["@livekit/components-"]
},
{
"groupName": "Vaul",
"matchDepNames": ["vaul"],
"extends": ["schedule:monthly"],
"prHeader": "Please review modals on mobile for visual regressions."
} }
], ],
"semanticCommits": "disabled", "semanticCommits": "disabled",

View File

@@ -28,12 +28,6 @@ declare global {
OLM_OPTIONS: Record<string, string>; OLM_OPTIONS: Record<string, string>;
} }
// TypeScript doesn't know about the experimental setSinkId method, so we
// declare it ourselves
interface MediaElement extends HTMLVideoElement {
setSinkId: (id: string) => void;
}
interface HTMLElement { interface HTMLElement {
// Safari only supports this prefixed, so tell the type system about it // Safari only supports this prefixed, so tell the type system about it
webkitRequestFullscreen: () => void; webkitRequestFullscreen: () => void;

View File

@@ -65,11 +65,21 @@ export interface ConfigOptions {
}; };
/** /**
* Allow to join a group calls without audio and video. * TEMPORARY experimental features.
* TEMPORARY: Is a feature that's not proved and experimental
*/ */
features?: { features?: {
feature_group_calls_without_video_and_audio: boolean; /**
* Allow to join group calls without audio and video.
*/
feature_group_calls_without_video_and_audio?: boolean;
/**
* Send device-specific call session membership state events instead of
* legacy user-specific call membership state events.
* This setting has no effect when the user joins an active call with
* legacy state events. For compatibility, Element Call will always join
* active legacy calls with legacy state events.
*/
feature_use_device_session_member_events?: boolean;
}; };
/** /**

View File

@@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import { BrowserTracing } from "@sentry/browser";
import i18n from "i18next"; import i18n from "i18next";
import { initReactI18next } from "react-i18next"; import { initReactI18next } from "react-i18next";
import LanguageDetector from "i18next-browser-languagedetector"; import LanguageDetector from "i18next-browser-languagedetector";
@@ -160,10 +159,7 @@ export class Initializer {
dsn: Config.get().sentry?.DSN, dsn: Config.get().sentry?.DSN,
environment: Config.get().sentry?.environment, environment: Config.get().sentry?.environment,
integrations: [ integrations: [
new BrowserTracing({ Sentry.reactRouterV5BrowserTracingIntegration({ history }),
routingInstrumentation:
Sentry.reactRouterV5Instrumentation(history),
}),
], ],
tracesSampleRate: 1.0, tracesSampleRate: 1.0,
}); });

View File

@@ -40,7 +40,6 @@ import {
SummaryStatsReport, SummaryStatsReport,
CallFeedReport, CallFeedReport,
} from "matrix-js-sdk/src/webrtc/stats/statsReport"; } from "matrix-js-sdk/src/webrtc/stats/statsReport";
import { setSpan } from "@opentelemetry/api/build/esm/trace/context-utils";
import { ElementCallOpenTelemetry } from "./otel"; import { ElementCallOpenTelemetry } from "./otel";
import { ObjectFlattener } from "./ObjectFlattener"; import { ObjectFlattener } from "./ObjectFlattener";
@@ -446,7 +445,7 @@ export class OTelGroupCallMembership {
const type = OTelStatsReportType.SummaryReport; const type = OTelStatsReportType.SummaryReport;
const data = ObjectFlattener.flattenSummaryStatsReportObject(statsReport); const data = ObjectFlattener.flattenSummaryStatsReportObject(statsReport);
if (this.statsReportSpan.span === undefined && this.callMembershipSpan) { if (this.statsReportSpan.span === undefined && this.callMembershipSpan) {
const ctx = setSpan( const ctx = opentelemetry.trace.setSpan(
opentelemetry.context.active(), opentelemetry.context.active(),
this.callMembershipSpan, this.callMembershipSpan,
); );

View File

@@ -118,7 +118,7 @@ export function useProfile(client: MatrixClient | undefined): UseProfile {
displayName, displayName,
avatarUrl: removeAvatar avatarUrl: removeAvatar
? undefined ? undefined
: mxcAvatarUrl ?? prev.avatarUrl, : (mxcAvatarUrl ?? prev.avatarUrl),
loading: false, loading: false,
success: true, success: true,
})); }));

View File

@@ -80,17 +80,12 @@ export const GroupCallView: FC<Props> = ({
const memberships = useMatrixRTCSessionMemberships(rtcSession); const memberships = useMatrixRTCSessionMemberships(rtcSession);
const isJoined = useMatrixRTCSessionJoinState(rtcSession); const isJoined = useMatrixRTCSessionJoinState(rtcSession);
// The mute state reactively gets updated once the participant count reaches the threshold. // This should use `useEffectEvent` (only available in experimental versions)
// The user then still is able to unmute again.
// The more common case is that the user is muted from the start (participant count is already over the threshold).
const autoMuteHappened = useRef(false);
useEffect(() => { useEffect(() => {
if (autoMuteHappened.current) return; if (memberships.length >= MUTE_PARTICIPANT_COUNT)
if (memberships.length >= MUTE_PARTICIPANT_COUNT) {
muteStates.audio.setEnabled?.(false); muteStates.audio.setEnabled?.(false);
autoMuteHappened.current = true; // eslint-disable-next-line react-hooks/exhaustive-deps
} }, []);
}, [autoMuteHappened, memberships, muteStates.audio]);
useEffect(() => { useEffect(() => {
window.rtcSession = rtcSession; window.rtcSession = rtcSession;

View File

@@ -254,7 +254,7 @@ export const InCallView: FC<InCallViewProps> = subscribe(
() => () =>
fullscreenItem ?? fullscreenItem ??
(noControls (noControls
? items.find((item) => item.isSpeaker) ?? items.at(0) ?? null ? (items.find((item) => item.isSpeaker) ?? items.at(0) ?? null)
: null), : null),
[fullscreenItem, noControls, items], [fullscreenItem, noControls, items],
); );

View File

@@ -53,7 +53,7 @@ function useMuteState(
): MuteState { ): MuteState {
const [enabled, setEnabled] = useReactiveState<boolean | undefined>( const [enabled, setEnabled] = useReactiveState<boolean | undefined>(
(prev) => (prev) =>
device.available.length > 0 ? prev ?? enabledByDefault() : undefined, device.available.length > 0 ? (prev ?? enabledByDefault()) : undefined,
[device], [device],
); );
return useMemo( return useMemo(

View File

@@ -65,7 +65,7 @@ export function useFullscreen<T>(items: TileDescriptor<T>[]): {
(prevItem) => (prevItem) =>
prevItem == null prevItem == null
? null ? null
: items.find((i) => i.id === prevItem.id) ?? null, : (items.find((i) => i.id === prevItem.id) ?? null),
[items], [items],
); );
@@ -79,7 +79,7 @@ export function useFullscreen<T>(items: TileDescriptor<T>[]): {
(itemId: string) => { (itemId: string) => {
setFullscreenItem( setFullscreenItem(
latestFullscreenItem.current === null latestFullscreenItem.current === null
? latestItems.current.find((i) => i.id === itemId) ?? null ? (latestItems.current.find((i) => i.id === itemId) ?? null)
: null, : null,
); );
}, },

View File

@@ -225,16 +225,38 @@ export const useLoadGroupCall = (
}); });
} else { } else {
// If the room does not exist we first search for it with viaServers // If the room does not exist we first search for it with viaServers
const roomSummary = await client.getRoomSummary(roomId, viaServers); let roomSummary: RoomSummary | undefined = undefined;
if (roomSummary.join_rule === JoinRule.Public) { try {
room = await client.joinRoom(roomSummary.room_id, { roomSummary = await client.getRoomSummary(roomId, viaServers);
} catch (error) {
// If the room summary endpoint is not supported we let it be undefined and treat this case like
// `JoinRule.Public`.
// This is how the logic was done before: "we expect any room id passed to EC
// to be for a public call" Which is definitely not ideal but worth a try if fetching
// the summary crashes.
logger.warn(
`Could not load room summary to decide whether we want to join or knock.
EC will fallback to join as if this would be a public room.
Reach out to your homeserver admin to ask them about supporting the \`/summary\` endpoint (im.nheko.summary):`,
error,
);
}
if (
roomSummary === undefined ||
roomSummary.join_rule === JoinRule.Public
) {
room = await client.joinRoom(roomId, {
viaServers, viaServers,
}); });
} else if (roomSummary.join_rule === JoinRule.Knock) { } else if (roomSummary.join_rule === JoinRule.Knock) {
// bind room summary in this scope so we have it stored in a binding of type `RoomSummary`
// instead of `RoomSummary | undefined`. Because we use it in a promise the linter does not accept
// the type check from the if condition above.
const _roomSummary = roomSummary;
let knock: () => void = () => {}; let knock: () => void = () => {};
const userPressedAskToJoinPromise: Promise<void> = new Promise( const userPressedAskToJoinPromise: Promise<void> = new Promise(
(resolve) => { (resolve) => {
if (roomSummary.membership !== KnownMembership.Knock) { if (_roomSummary.membership !== KnownMembership.Knock) {
knock = resolve; knock = resolve;
} else { } else {
// resolve immediately if the user already knocked // resolve immediately if the user already knocked
@@ -242,12 +264,13 @@ export const useLoadGroupCall = (
} }
}, },
); );
setState({ kind: "canKnock", roomSummary, knock }); setState({ kind: "canKnock", roomSummary: _roomSummary, knock });
await userPressedAskToJoinPromise; await userPressedAskToJoinPromise;
room = await getRoomByKnocking( room = await getRoomByKnocking(
roomSummary.room_id, roomSummary.room_id,
viaServers, viaServers,
() => setState({ kind: "waitForInvite", roomSummary }), () =>
setState({ kind: "waitForInvite", roomSummary: _roomSummary }),
); );
} else { } else {
throw new Error( throw new Error(

View File

@@ -108,10 +108,17 @@ export async function enterRTCSession(
// right now we assume everything is a room-scoped call // right now we assume everything is a room-scoped call
const livekitAlias = rtcSession.room.roomId; const livekitAlias = rtcSession.room.roomId;
const useDeviceSessionMemberEvents =
Config.get().features?.feature_use_device_session_member_events;
rtcSession.joinRoomSession( rtcSession.joinRoomSession(
await makePreferredLivekitFoci(rtcSession, livekitAlias), await makePreferredLivekitFoci(rtcSession, livekitAlias),
makeActiveFocus(), makeActiveFocus(),
{ manageMediaKeys: encryptMedia }, {
manageMediaKeys: encryptMedia,
...(useDeviceSessionMemberEvents !== undefined && {
useLegacyMemberEvents: !useDeviceSessionMemberEvents,
}),
},
); );
} }

View File

@@ -54,11 +54,11 @@ export const ProfileSettingsTab: FC<Props> = ({ client }) => {
const avatar = data.get("avatar"); const avatar = data.get("avatar");
const avatarSize = const avatarSize =
typeof avatar == "string" ? avatar.length : avatar?.size ?? 0; typeof avatar == "string" ? avatar.length : (avatar?.size ?? 0);
const displayName = const displayName =
typeof displayNameDataEntry == "string" typeof displayNameDataEntry == "string"
? displayNameDataEntry ? displayNameDataEntry
: displayNameDataEntry?.name ?? null; : (displayNameDataEntry?.name ?? null);
if (!displayName) { if (!displayName) {
return; return;

View File

@@ -118,13 +118,17 @@ export const widget = ((): WidgetHelpers | null => {
"org.matrix.rageshake_request", "org.matrix.rageshake_request",
EventType.CallEncryptionKeysPrefix, EventType.CallEncryptionKeysPrefix,
]; ];
const sendState = [ const sendState = [
{ userId, // legacy call membership events
`_${userId}_${deviceId}`, // session membership events
`${userId}_${deviceId}`, // MSC3779 session membership events
].map((stateKey) => ({
eventType: EventType.GroupCallMemberPrefix, eventType: EventType.GroupCallMemberPrefix,
stateKey: userId, // TODO: based on if we use the new format we want the key to be: `_${userId}_${deviceId}` stateKey,
}, }));
];
const receiveState = [ const receiveState = [
{ eventType: EventType.RoomCreate },
{ eventType: EventType.RoomMember }, { eventType: EventType.RoomMember },
{ eventType: EventType.RoomEncryption }, { eventType: EventType.RoomEncryption },
{ eventType: EventType.GroupCallMemberPrefix }, { eventType: EventType.GroupCallMemberPrefix },

4321
yarn.lock

File diff suppressed because it is too large Load Diff