Skip to content

Commit b9afe23

Browse files
committed
Merge tag 'v23.0.0' into sc
* Process `m.room.encryption` events before emitting `RoomMember` events ([\matrix-org#2914](matrix-org#2914)). Fixes element-hq/element-web#23819. * Don't expose `calls` on `GroupCall` ([\matrix-org#2941](matrix-org#2941)). * Support MSC3391: Account data deletion ([\matrix-org#2967](matrix-org#2967)). * Add a message ID on each to-device message ([\matrix-org#2938](matrix-org#2938)). * Enable multiple users' power levels to be set at once ([\matrix-org#2892](matrix-org#2892)). Contributed by @GoodGuyMarco. * Include pending events in thread summary and count again ([\matrix-org#2922](matrix-org#2922)). Fixes element-hq/element-web#23642. * Make GroupCall work better with widgets ([\matrix-org#2935](matrix-org#2935)). * Add method to get outgoing room key requests for a given event ([\matrix-org#2930](matrix-org#2930)). * Fix messages loaded during initial fetch ending up out of order ([\matrix-org#2971](matrix-org#2971)). Fixes element-hq/element-web#23972. * Fix #23919: Root message for new thread loaded from network ([\matrix-org#2965](matrix-org#2965)). Fixes element-hq/element-web#23919. * Fix #23916: Prevent edits of the last message in a thread getting lost ([\matrix-org#2951](matrix-org#2951)). Fixes element-hq/element-web#23916 and element-hq/element-web#23942. * Fix infinite loop when restoring cached read receipts ([\matrix-org#2963](matrix-org#2963)). Fixes element-hq/element-web#23951. * Don't swallow errors coming from the shareSession call ([\matrix-org#2962](matrix-org#2962)). Fixes element-hq/element-web#23792. * Make sure that MegolmEncryption.setupPromise always resolves ([\matrix-org#2960](matrix-org#2960)). * Do not calculate highlight notifs for threads unknown to the room ([\matrix-org#2957](matrix-org#2957)). * Cache read receipts for unknown threads ([\matrix-org#2953](matrix-org#2953)). * bugfix: sliding sync initial room timelines shouldn't notify ([\matrix-org#2933](matrix-org#2933)). * Redo key sharing after own device verification ([\matrix-org#2921](matrix-org#2921)). Fixes element-hq/element-web#23333. * Move updated threads to the end of the thread list ([\matrix-org#2923](matrix-org#2923)). Fixes element-hq/element-web#23876. * Fix highlight notifications increasing when total notification is zero ([\matrix-org#2937](matrix-org#2937)). Fixes element-hq/element-web#23885. * Fix synthesizeReceipt ([\matrix-org#2916](matrix-org#2916)). Fixes element-hq/element-web#23827 element-hq/element-web#23754 and element-hq/element-web#23847.
2 parents 789e2bf + efc87d8 commit b9afe23

File tree

256 files changed

+25020
-24008
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

256 files changed

+25020
-24008
lines changed

.babelrc

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
22
"sourceMaps": true,
33
"presets": [
4-
["@babel/preset-env", {
5-
"targets": {
6-
"node": 10
7-
},
8-
"modules": "commonjs"
9-
}],
4+
[
5+
"@babel/preset-env",
6+
{
7+
"targets": {
8+
"node": 10
9+
},
10+
"modules": "commonjs"
11+
}
12+
],
1013
"@babel/preset-typescript"
1114
],
1215
"plugins": [

.eslintrc.js

Lines changed: 78 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
module.exports = {
2-
plugins: [
3-
"matrix-org",
4-
"import",
5-
],
6-
extends: [
7-
"plugin:matrix-org/babel",
8-
"plugin:import/typescript",
9-
],
2+
plugins: ["matrix-org", "import", "jsdoc"],
3+
extends: ["plugin:matrix-org/babel", "plugin:import/typescript"],
104
env: {
115
browser: true,
126
node: true,
@@ -27,72 +21,95 @@ module.exports = {
2721
"padded-blocks": ["error"],
2822
"no-extend-native": ["error"],
2923
"camelcase": ["error"],
30-
"no-multi-spaces": ["error", { "ignoreEOLComments": true }],
31-
"space-before-function-paren": ["error", {
32-
"anonymous": "never",
33-
"named": "never",
34-
"asyncArrow": "always",
35-
}],
24+
"no-multi-spaces": ["error", { ignoreEOLComments: true }],
25+
"space-before-function-paren": [
26+
"error",
27+
{
28+
anonymous: "never",
29+
named: "never",
30+
asyncArrow: "always",
31+
},
32+
],
3633
"arrow-parens": "off",
3734
"prefer-promise-reject-errors": "off",
38-
"quotes": "off",
39-
"indent": "off",
4035
"no-constant-condition": "off",
4136
"no-async-promise-executor": "off",
4237
// We use a `logger` intermediary module
4338
"no-console": "error",
4439

4540
// restrict EventEmitters to force callers to use TypedEventEmitter
46-
"no-restricted-imports": ["error", {
47-
name: "events",
48-
message: "Please use TypedEventEmitter instead"
49-
}],
50-
51-
"import/no-restricted-paths": ["error", {
52-
"zones": [{
53-
"target": "./src/",
54-
"from": "./src/index.ts",
55-
"message": "The package index is dynamic between src and lib depending on " +
56-
"whether release or development, target the specific module or matrix.ts instead",
57-
}],
58-
}],
59-
},
60-
overrides: [{
61-
files: [
62-
"**/*.ts",
41+
"no-restricted-imports": [
42+
"error",
43+
{
44+
name: "events",
45+
message: "Please use TypedEventEmitter instead",
46+
},
6347
],
64-
extends: [
65-
"plugin:matrix-org/typescript",
48+
49+
"import/no-restricted-paths": [
50+
"error",
51+
{
52+
zones: [
53+
{
54+
target: "./src/",
55+
from: "./src/index.ts",
56+
message:
57+
"The package index is dynamic between src and lib depending on " +
58+
"whether release or development, target the specific module or matrix.ts instead",
59+
},
60+
],
61+
},
6662
],
67-
rules: {
68-
// TypeScript has its own version of this
69-
"@babel/no-invalid-this": "off",
63+
},
64+
overrides: [
65+
{
66+
files: ["**/*.ts"],
67+
plugins: ["eslint-plugin-tsdoc"],
68+
extends: ["plugin:matrix-org/typescript"],
69+
rules: {
70+
// TypeScript has its own version of this
71+
"@babel/no-invalid-this": "off",
7072

71-
// We're okay being explicit at the moment
72-
"@typescript-eslint/no-empty-interface": "off",
73-
// We disable this while we're transitioning
74-
"@typescript-eslint/no-explicit-any": "off",
75-
// We'd rather not do this but we do
76-
"@typescript-eslint/ban-ts-comment": "off",
77-
// We're okay with assertion errors when we ask for them
78-
"@typescript-eslint/no-non-null-assertion": "off",
73+
// We're okay being explicit at the moment
74+
"@typescript-eslint/no-empty-interface": "off",
75+
// We disable this while we're transitioning
76+
"@typescript-eslint/no-explicit-any": "off",
77+
// We'd rather not do this but we do
78+
"@typescript-eslint/ban-ts-comment": "off",
79+
// We're okay with assertion errors when we ask for them
80+
"@typescript-eslint/no-non-null-assertion": "off",
7981

80-
// The non-TypeScript rule produces false positives
81-
"func-call-spacing": "off",
82-
"@typescript-eslint/func-call-spacing": ["error"],
82+
// The non-TypeScript rule produces false positives
83+
"func-call-spacing": "off",
84+
"@typescript-eslint/func-call-spacing": ["error"],
8385

84-
"quotes": "off",
85-
// We use a `logger` intermediary module
86-
"no-console": "error",
86+
"quotes": "off",
87+
// We use a `logger` intermediary module
88+
"no-console": "error",
89+
},
8790
},
88-
}, {
89-
files: [
90-
"spec/**/*.ts",
91-
],
92-
rules: {
93-
// We don't need super strict typing in test utilities
94-
"@typescript-eslint/explicit-function-return-type": "off",
95-
"@typescript-eslint/explicit-member-accessibility": "off",
91+
{
92+
// We don't need amazing docs in our spec files
93+
files: ["src/**/*.ts"],
94+
rules: {
95+
"tsdoc/syntax": "error",
96+
// We use some select jsdoc rules as the tsdoc linter has only one rule
97+
"jsdoc/no-types": "error",
98+
"jsdoc/empty-tags": "error",
99+
"jsdoc/check-property-names": "error",
100+
"jsdoc/check-values": "error",
101+
// These need a bit more work before we can enable
102+
// "jsdoc/check-param-names": "error",
103+
// "jsdoc/check-indentation": "error",
104+
},
96105
},
97-
}],
106+
{
107+
files: ["spec/**/*.ts"],
108+
rules: {
109+
// We don't need super strict typing in test utilities
110+
"@typescript-eslint/explicit-function-return-type": "off",
111+
"@typescript-eslint/explicit-member-accessibility": "off",
112+
},
113+
},
114+
],
98115
};

.github/renovate.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": [
4-
"github>matrix-org/renovate-config-element-web"
5-
]
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["github>matrix-org/renovate-config-element-web"]
64
}

.github/workflows/backport.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
name: Backport
22
on:
3-
pull_request_target:
4-
types:
5-
- closed
6-
- labeled
7-
branches:
8-
- develop
3+
pull_request_target:
4+
types:
5+
- closed
6+
- labeled
7+
branches:
8+
- develop
99

1010
jobs:
11-
backport:
12-
name: Backport
13-
runs-on: ubuntu-latest
14-
# Only react to merged PRs for security reasons.
15-
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
16-
if: >
17-
github.event.pull_request.merged
18-
&& (
19-
github.event.action == 'closed'
20-
|| (
21-
github.event.action == 'labeled'
22-
&& contains(github.event.label.name, 'backport')
23-
)
24-
)
25-
steps:
26-
- uses: tibdex/backport@v2
27-
with:
28-
labels_template: "<%= JSON.stringify([...labels, 'X-Release-Blocker']) %>"
29-
# We can't use GITHUB_TOKEN here or CI won't run on the new PR
30-
github_token: ${{ secrets.ELEMENT_BOT_TOKEN }}
11+
backport:
12+
name: Backport
13+
runs-on: ubuntu-latest
14+
# Only react to merged PRs for security reasons.
15+
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
16+
if: >
17+
github.event.pull_request.merged
18+
&& (
19+
github.event.action == 'closed'
20+
|| (
21+
github.event.action == 'labeled'
22+
&& contains(github.event.label.name, 'backport')
23+
)
24+
)
25+
steps:
26+
- uses: tibdex/backport@v2
27+
with:
28+
labels_template: "<%= JSON.stringify([...labels, 'X-Release-Blocker']) %>"
29+
# We can't use GITHUB_TOKEN here or CI won't run on the new PR
30+
github_token: ${{ secrets.ELEMENT_BOT_TOKEN }}
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
name: Deploy documentation PR preview
22

33
on:
4-
workflow_run:
5-
workflows: [ "Static Analysis" ]
6-
types:
7-
- completed
4+
workflow_run:
5+
workflows: ["Static Analysis"]
6+
types:
7+
- completed
88

99
jobs:
10-
netlify:
11-
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request'
12-
runs-on: ubuntu-latest
13-
steps:
14-
# There's a 'download artifact' action, but it hasn't been updated for the workflow_run action
15-
# (https://github.com/actions/download-artifact/issues/60) so instead we get this mess:
16-
- name: 📥 Download artifact
17-
uses: dawidd6/action-download-artifact@e6e25ac3a2b93187502a8be1ef9e9603afc34925 # v2.24.2
18-
with:
19-
workflow: static_analysis.yml
20-
run_id: ${{ github.event.workflow_run.id }}
21-
name: docs
22-
path: docs
10+
netlify:
11+
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request'
12+
runs-on: ubuntu-latest
13+
steps:
14+
# There's a 'download artifact' action, but it hasn't been updated for the workflow_run action
15+
# (https://github.com/actions/download-artifact/issues/60) so instead we get this mess:
16+
- name: 📥 Download artifact
17+
uses: dawidd6/action-download-artifact@e6e25ac3a2b93187502a8be1ef9e9603afc34925 # v2.24.2
18+
with:
19+
workflow: static_analysis.yml
20+
run_id: ${{ github.event.workflow_run.id }}
21+
name: docs
22+
path: docs
2323

24-
- name: 📤 Deploy to Netlify
25-
uses: matrix-org/netlify-pr-preview@v1
26-
with:
27-
path: docs
28-
owner: ${{ github.event.workflow_run.head_repository.owner.login }}
29-
branch: ${{ github.event.workflow_run.head_branch }}
30-
revision: ${{ github.event.workflow_run.head_sha }}
31-
token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
32-
site_id: ${{ secrets.NETLIFY_SITE_ID }}
33-
desc: Documentation preview
34-
deployment_env: PR Documentation Preview
24+
- name: 📤 Deploy to Netlify
25+
uses: matrix-org/netlify-pr-preview@v1
26+
with:
27+
path: docs
28+
owner: ${{ github.event.workflow_run.head_repository.owner.login }}
29+
branch: ${{ github.event.workflow_run.head_branch }}
30+
revision: ${{ github.event.workflow_run.head_sha }}
31+
token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
32+
site_id: ${{ secrets.NETLIFY_SITE_ID }}
33+
desc: Documentation preview
34+
deployment_env: PR Documentation Preview

.github/workflows/release-npm.yml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
# Must only be called from `release#published` triggers
22
name: Publish to npm
33
on:
4-
workflow_call:
5-
secrets:
6-
NPM_TOKEN:
7-
required: true
4+
workflow_call:
5+
secrets:
6+
NPM_TOKEN:
7+
required: true
88
jobs:
9-
npm:
10-
name: Publish to npm
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: 🧮 Checkout code
14-
uses: actions/checkout@v3
9+
npm:
10+
name: Publish to npm
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: 🧮 Checkout code
14+
uses: actions/checkout@v3
1515

16-
- name: 🔧 Yarn cache
17-
uses: actions/setup-node@v3
18-
with:
19-
cache: "yarn"
20-
registry-url: 'https://registry.npmjs.org'
16+
- name: 🔧 Yarn cache
17+
uses: actions/setup-node@v3
18+
with:
19+
cache: "yarn"
20+
registry-url: "https://registry.npmjs.org"
2121

22-
- name: 🔨 Install dependencies
23-
run: "yarn install --pure-lockfile"
22+
- name: 🔨 Install dependencies
23+
run: "yarn install --pure-lockfile"
2424

25-
- name: 🚀 Publish to npm
26-
id: npm-publish
27-
uses: JS-DevTools/npm-publish@v1
28-
with:
29-
token: ${{ secrets.NPM_TOKEN }}
30-
access: public
31-
tag: next
25+
- name: 🚀 Publish to npm
26+
id: npm-publish
27+
uses: JS-DevTools/npm-publish@v1
28+
with:
29+
token: ${{ secrets.NPM_TOKEN }}
30+
access: public
31+
tag: next
3232

33-
- name: 🎖️ Add `latest` dist-tag to final releases
34-
if: github.event.release.prerelease == false
35-
run: |
36-
package=$(cat package.json | jq -er .name)
37-
npm dist-tag add "$package@$release" latest
38-
env:
39-
# JS-DevTools/npm-publish overrides `NODE_AUTH_TOKEN` with `INPUT_TOKEN` in .npmrc
40-
INPUT_TOKEN: ${{ secrets.NPM_TOKEN }}
41-
release: ${{ steps.npm-publish.outputs.version }}
33+
- name: 🎖️ Add `latest` dist-tag to final releases
34+
if: github.event.release.prerelease == false
35+
run: |
36+
package=$(cat package.json | jq -er .name)
37+
npm dist-tag add "$package@$release" latest
38+
env:
39+
# JS-DevTools/npm-publish overrides `NODE_AUTH_TOKEN` with `INPUT_TOKEN` in .npmrc
40+
INPUT_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
release: ${{ steps.npm-publish.outputs.version }}

0 commit comments

Comments
 (0)