Support room version 12 and the "creator power level"

This commit is contained in:
N-Pex 2025-08-06 12:07:50 +02:00
parent f804e0377b
commit c36deef7e2
13 changed files with 351 additions and 113 deletions

328
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "keanuapp-weblite",
"version": "0.1.51",
"version": "0.1.59",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "keanuapp-weblite",
"version": "0.1.51",
"version": "0.1.59",
"dependencies": {
"@guardianproject/proofmode": "^0.4.0",
"@matrix-org/olm": "^3.2.12",
@ -27,7 +27,7 @@
"linkify-html": "^4.1.0",
"linkifyjs": "^4.1.0",
"material-design-icons-iconfont": "^6.7.0",
"matrix-js-sdk": "^37.6.0",
"matrix-js-sdk": "^37.12.0",
"md-gum-polyfill": "^1.0.0",
"path-browserify": "^1.0.1",
"pretty-bytes": "^5.6.0",
@ -968,13 +968,13 @@
"dev": true
},
"node_modules/@intlify/core-base": {
"version": "11.1.3",
"resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-11.1.3.tgz",
"integrity": "sha512-cMuHunYO7LE80azTitcvEbs1KJmtd6g7I5pxlApV3Jo547zdO3h31/0uXpqHc+Y3RKt1wo2y68RGSx77Z1klyA==",
"version": "11.1.11",
"resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-11.1.11.tgz",
"integrity": "sha512-1Z0N8jTfkcD2Luq9HNZt+GmjpFe4/4PpZF3AOzoO1u5PTtSuXZcfhwBatywbfE2ieB/B5QHIoOFmCXY2jqVKEQ==",
"license": "MIT",
"dependencies": {
"@intlify/message-compiler": "11.1.3",
"@intlify/shared": "11.1.3"
"@intlify/message-compiler": "11.1.11",
"@intlify/shared": "11.1.11"
},
"engines": {
"node": ">= 16"
@ -984,12 +984,12 @@
}
},
"node_modules/@intlify/message-compiler": {
"version": "11.1.3",
"resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-11.1.3.tgz",
"integrity": "sha512-7rbqqpo2f5+tIcwZTAG/Ooy9C8NDVwfDkvSeDPWUPQW+Dyzfw2o9H103N5lKBxO7wxX9dgCDjQ8Umz73uYw3hw==",
"version": "11.1.11",
"resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-11.1.11.tgz",
"integrity": "sha512-7PC6neomoc/z7a8JRjPBbu0T2TzR2MQuY5kn2e049MP7+o32Ve7O8husylkA7K9fQRe4iNXZWTPnDJ6vZdtS1Q==",
"license": "MIT",
"dependencies": {
"@intlify/shared": "11.1.3",
"@intlify/shared": "11.1.11",
"source-map-js": "^1.0.2"
},
"engines": {
@ -1000,9 +1000,9 @@
}
},
"node_modules/@intlify/shared": {
"version": "11.1.3",
"resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-11.1.3.tgz",
"integrity": "sha512-pTFBgqa/99JRA2H1qfyqv97MKWJrYngXBA/I0elZcYxvJgcCw3mApAoPW3mJ7vx3j+Ti0FyKUFZ4hWxdjKaxvA==",
"version": "11.1.11",
"resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-11.1.11.tgz",
"integrity": "sha512-RIBFTIqxZSsxUqlcyoR7iiC632bq7kkOwYvZlvcVObHfrF4NhuKc4FKvu8iPCrEO+e3XsY7/UVpfgzg+M7ETzA==",
"license": "MIT",
"engines": {
"node": ">= 16"
@ -1070,9 +1070,9 @@
}
},
"node_modules/@matrix-org/matrix-sdk-crypto-wasm": {
"version": "14.0.1",
"resolved": "https://registry.npmjs.org/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-14.0.1.tgz",
"integrity": "sha512-CgLpHs6nTw5pjSsMBi9xbQnBXf2l8YhImQP9cv8nbGSCYdYjFI0FilMXffzjWV5HThpNHri/3pF20ahZtuS3VA==",
"version": "15.1.0",
"resolved": "https://registry.npmjs.org/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-15.1.0.tgz",
"integrity": "sha512-ZsDdjn46J3+VxsDLmaSODuS+qtGZB/i3Cg9tWL1QPNjvAWzNaTHQ7glleByI2PKVBm83aklfuhGKT2MqE1ZsEA==",
"license": "Apache-2.0",
"engines": {
"node": ">= 18"
@ -2749,10 +2749,11 @@
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
},
"node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"version": "1.1.12",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -3762,6 +3763,21 @@
"node": ">= 0.4"
}
},
"node_modules/es-set-tostringtag": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
"integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
"license": "MIT",
"dependencies": {
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.6",
"has-tostringtag": "^1.0.2",
"hasown": "^2.0.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/esbuild": {
"version": "0.25.1",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.1.tgz",
@ -4388,12 +4404,15 @@
}
},
"node_modules/form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
"integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==",
"license": "MIT",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"es-set-tostringtag": "^2.1.0",
"hasown": "^2.0.2",
"mime-types": "^2.1.12"
},
"engines": {
@ -5000,6 +5019,12 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/isarray": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
"integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
"license": "MIT"
},
"node_modules/isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
@ -5192,9 +5217,10 @@
}
},
"node_modules/linkifyjs": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-4.1.0.tgz",
"integrity": "sha512-Ffv8VoY3+ixI1b3aZ3O+jM6x17cOsgwfB1Wq7pkytbo1WlyRp6ZO0YDMqiWT/gQPY/CmtiGuKfzDIVqxh1aCTA=="
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-4.3.2.tgz",
"integrity": "sha512-NT1CJtq3hHIreOianA8aSXn6Cw0JzYOuDQbOrSPe7gqFnCpKP++MQe3ODgO3oh2GJFORkAAdqredOa60z63GbA==",
"license": "MIT"
},
"node_modules/loader-runner": {
"version": "4.3.0",
@ -5325,14 +5351,13 @@
"integrity": "sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA=="
},
"node_modules/matrix-js-sdk": {
"version": "37.6.0",
"resolved": "https://registry.npmjs.org/matrix-js-sdk/-/matrix-js-sdk-37.6.0.tgz",
"integrity": "sha512-OdqZGqSarksiesHovQngeVcu7+fEkJUDk0pNX/LZg+HYZfyMrKgX3fb7WNhqcBW6kuTYGwkBvY5/LpE2AFabXw==",
"version": "37.12.0",
"resolved": "https://registry.npmjs.org/matrix-js-sdk/-/matrix-js-sdk-37.12.0.tgz",
"integrity": "sha512-2JSTMtvACE4egrBPp0ZQ7fSxBXcX6xuHcQSjcoBiBxFL7W0SZCl4qsNl30pBshDTe5wARAByzIHEMv6bGVKKNA==",
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@matrix-org/matrix-sdk-crypto-wasm": "^14.0.1",
"@matrix-org/olm": "3.2.15",
"@matrix-org/matrix-sdk-crypto-wasm": "^15.0.0",
"another-json": "^0.2.0",
"bs58": "^6.0.0",
"content-type": "^1.0.4",
@ -5795,20 +5820,53 @@
"license": "MIT"
},
"node_modules/pbkdf2": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz",
"integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==",
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.3.tgz",
"integrity": "sha512-wfRLBZ0feWRhCIkoMB6ete7czJcnNnqRpcoWQBLqatqXXmelSRqfdDK4F3u9T2s2cXas/hQJcryI/4lAL+XTlA==",
"license": "MIT",
"dependencies": {
"create-hash": "^1.1.2",
"create-hmac": "^1.1.4",
"ripemd160": "^2.0.1",
"safe-buffer": "^5.0.1",
"sha.js": "^2.4.8"
"create-hash": "~1.1.3",
"create-hmac": "^1.1.7",
"ripemd160": "=2.0.1",
"safe-buffer": "^5.2.1",
"sha.js": "^2.4.11",
"to-buffer": "^1.2.0"
},
"engines": {
"node": ">=0.12"
}
},
"node_modules/pbkdf2/node_modules/create-hash": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz",
"integrity": "sha512-snRpch/kwQhcdlnZKYanNF1m0RDlrCdSKQaH87w1FCFPVPNCQ/Il9QJKAX2jVBZddRdaHBMC+zXa9Gw9tmkNUA==",
"license": "MIT",
"dependencies": {
"cipher-base": "^1.0.1",
"inherits": "^2.0.1",
"ripemd160": "^2.0.0",
"sha.js": "^2.4.0"
}
},
"node_modules/pbkdf2/node_modules/hash-base": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz",
"integrity": "sha512-0TROgQ1/SxE6KmxWSvXHvRj90/Xo1JvZShofnYF+f6ZsGtR4eES7WfrQzPalmyagfKZCXpVnitiRebZulWsbiw==",
"license": "MIT",
"dependencies": {
"inherits": "^2.0.1"
}
},
"node_modules/pbkdf2/node_modules/ripemd160": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz",
"integrity": "sha512-J7f4wutN8mdbV08MJnXibYpCOPHR+yzy+iQ/AsjMv2j8cLavQ8VGagDFUwwTAdF8FmRKVeNpbTTEwNHCW1g94w==",
"license": "MIT",
"dependencies": {
"hash-base": "^2.0.0",
"inherits": "^2.0.1"
}
},
"node_modules/picocolors": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
@ -7008,6 +7066,20 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/to-buffer": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.1.tgz",
"integrity": "sha512-tB82LpAIWjhLYbqjx3X4zEeHN6M8CiuOEy2JY8SEQVdYRe3CCHOFaqrBW1doLDrfpWhplcW7BL+bO3/6S3pcDQ==",
"license": "MIT",
"dependencies": {
"isarray": "^2.0.5",
"safe-buffer": "^5.2.1",
"typed-array-buffer": "^1.0.3"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@ -7033,6 +7105,20 @@
"node": ">= 0.8.0"
}
},
"node_modules/typed-array-buffer": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz",
"integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==",
"license": "MIT",
"dependencies": {
"call-bound": "^1.0.3",
"es-errors": "^1.3.0",
"is-typed-array": "^1.1.14"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/typescript": {
"version": "5.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
@ -7623,13 +7709,13 @@
}
},
"node_modules/vue-i18n": {
"version": "11.1.3",
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-11.1.3.tgz",
"integrity": "sha512-Pcylh9z9S5+CJAqgbRZ3EKxFIBIrtY5YUppU722GIT65+Nukm0TCqiQegZnNLCZkXGthxe0cpqj0AoM51H+6Gw==",
"version": "11.1.11",
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-11.1.11.tgz",
"integrity": "sha512-LvyteQoXeQiuILbzqv13LbyBna/TEv2Ha+4ZWK2AwGHUzZ8+IBaZS0TJkCgn5izSPLcgZwXy9yyTrewCb2u/MA==",
"license": "MIT",
"dependencies": {
"@intlify/core-base": "11.1.3",
"@intlify/shared": "11.1.3",
"@intlify/core-base": "11.1.11",
"@intlify/shared": "11.1.11",
"@vue/devtools-api": "^6.5.0"
},
"engines": {
@ -8545,27 +8631,27 @@
"dev": true
},
"@intlify/core-base": {
"version": "11.1.3",
"resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-11.1.3.tgz",
"integrity": "sha512-cMuHunYO7LE80azTitcvEbs1KJmtd6g7I5pxlApV3Jo547zdO3h31/0uXpqHc+Y3RKt1wo2y68RGSx77Z1klyA==",
"version": "11.1.11",
"resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-11.1.11.tgz",
"integrity": "sha512-1Z0N8jTfkcD2Luq9HNZt+GmjpFe4/4PpZF3AOzoO1u5PTtSuXZcfhwBatywbfE2ieB/B5QHIoOFmCXY2jqVKEQ==",
"requires": {
"@intlify/message-compiler": "11.1.3",
"@intlify/shared": "11.1.3"
"@intlify/message-compiler": "11.1.11",
"@intlify/shared": "11.1.11"
}
},
"@intlify/message-compiler": {
"version": "11.1.3",
"resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-11.1.3.tgz",
"integrity": "sha512-7rbqqpo2f5+tIcwZTAG/Ooy9C8NDVwfDkvSeDPWUPQW+Dyzfw2o9H103N5lKBxO7wxX9dgCDjQ8Umz73uYw3hw==",
"version": "11.1.11",
"resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-11.1.11.tgz",
"integrity": "sha512-7PC6neomoc/z7a8JRjPBbu0T2TzR2MQuY5kn2e049MP7+o32Ve7O8husylkA7K9fQRe4iNXZWTPnDJ6vZdtS1Q==",
"requires": {
"@intlify/shared": "11.1.3",
"@intlify/shared": "11.1.11",
"source-map-js": "^1.0.2"
}
},
"@intlify/shared": {
"version": "11.1.3",
"resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-11.1.3.tgz",
"integrity": "sha512-pTFBgqa/99JRA2H1qfyqv97MKWJrYngXBA/I0elZcYxvJgcCw3mApAoPW3mJ7vx3j+Ti0FyKUFZ4hWxdjKaxvA=="
"version": "11.1.11",
"resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-11.1.11.tgz",
"integrity": "sha512-RIBFTIqxZSsxUqlcyoR7iiC632bq7kkOwYvZlvcVObHfrF4NhuKc4FKvu8iPCrEO+e3XsY7/UVpfgzg+M7ETzA=="
},
"@jridgewell/gen-mapping": {
"version": "0.3.8",
@ -8612,9 +8698,9 @@
}
},
"@matrix-org/matrix-sdk-crypto-wasm": {
"version": "14.0.1",
"resolved": "https://registry.npmjs.org/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-14.0.1.tgz",
"integrity": "sha512-CgLpHs6nTw5pjSsMBi9xbQnBXf2l8YhImQP9cv8nbGSCYdYjFI0FilMXffzjWV5HThpNHri/3pF20ahZtuS3VA=="
"version": "15.1.0",
"resolved": "https://registry.npmjs.org/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-15.1.0.tgz",
"integrity": "sha512-ZsDdjn46J3+VxsDLmaSODuS+qtGZB/i3Cg9tWL1QPNjvAWzNaTHQ7glleByI2PKVBm83aklfuhGKT2MqE1ZsEA=="
},
"@matrix-org/olm": {
"version": "3.2.15",
@ -9604,9 +9690,9 @@
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"version": "1.1.12",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
@ -10342,6 +10428,17 @@
"es-errors": "^1.3.0"
}
},
"es-set-tostringtag": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
"integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
"requires": {
"es-errors": "^1.3.0",
"get-intrinsic": "^1.2.6",
"has-tostringtag": "^1.0.2",
"hasown": "^2.0.2"
}
},
"esbuild": {
"version": "0.25.1",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.1.tgz",
@ -10785,12 +10882,14 @@
}
},
"form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
"integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"es-set-tostringtag": "^2.1.0",
"hasown": "^2.0.2",
"mime-types": "^2.1.12"
}
},
@ -11192,6 +11291,11 @@
"which-typed-array": "^1.1.16"
}
},
"isarray": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
"integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw=="
},
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
@ -11337,9 +11441,9 @@
"requires": {}
},
"linkifyjs": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-4.1.0.tgz",
"integrity": "sha512-Ffv8VoY3+ixI1b3aZ3O+jM6x17cOsgwfB1Wq7pkytbo1WlyRp6ZO0YDMqiWT/gQPY/CmtiGuKfzDIVqxh1aCTA=="
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-4.3.2.tgz",
"integrity": "sha512-NT1CJtq3hHIreOianA8aSXn6Cw0JzYOuDQbOrSPe7gqFnCpKP++MQe3ODgO3oh2GJFORkAAdqredOa60z63GbA=="
},
"loader-runner": {
"version": "4.3.0",
@ -11438,13 +11542,12 @@
"integrity": "sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA=="
},
"matrix-js-sdk": {
"version": "37.6.0",
"resolved": "https://registry.npmjs.org/matrix-js-sdk/-/matrix-js-sdk-37.6.0.tgz",
"integrity": "sha512-OdqZGqSarksiesHovQngeVcu7+fEkJUDk0pNX/LZg+HYZfyMrKgX3fb7WNhqcBW6kuTYGwkBvY5/LpE2AFabXw==",
"version": "37.12.0",
"resolved": "https://registry.npmjs.org/matrix-js-sdk/-/matrix-js-sdk-37.12.0.tgz",
"integrity": "sha512-2JSTMtvACE4egrBPp0ZQ7fSxBXcX6xuHcQSjcoBiBxFL7W0SZCl4qsNl30pBshDTe5wARAByzIHEMv6bGVKKNA==",
"requires": {
"@babel/runtime": "^7.12.5",
"@matrix-org/matrix-sdk-crypto-wasm": "^14.0.1",
"@matrix-org/olm": "3.2.15",
"@matrix-org/matrix-sdk-crypto-wasm": "^15.0.0",
"another-json": "^0.2.0",
"bs58": "^6.0.0",
"content-type": "^1.0.4",
@ -11792,15 +11895,46 @@
"dev": true
},
"pbkdf2": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz",
"integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==",
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.3.tgz",
"integrity": "sha512-wfRLBZ0feWRhCIkoMB6ete7czJcnNnqRpcoWQBLqatqXXmelSRqfdDK4F3u9T2s2cXas/hQJcryI/4lAL+XTlA==",
"requires": {
"create-hash": "^1.1.2",
"create-hmac": "^1.1.4",
"ripemd160": "^2.0.1",
"safe-buffer": "^5.0.1",
"sha.js": "^2.4.8"
"create-hash": "~1.1.3",
"create-hmac": "^1.1.7",
"ripemd160": "=2.0.1",
"safe-buffer": "^5.2.1",
"sha.js": "^2.4.11",
"to-buffer": "^1.2.0"
},
"dependencies": {
"create-hash": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz",
"integrity": "sha512-snRpch/kwQhcdlnZKYanNF1m0RDlrCdSKQaH87w1FCFPVPNCQ/Il9QJKAX2jVBZddRdaHBMC+zXa9Gw9tmkNUA==",
"requires": {
"cipher-base": "^1.0.1",
"inherits": "^2.0.1",
"ripemd160": "^2.0.0",
"sha.js": "^2.4.0"
}
},
"hash-base": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz",
"integrity": "sha512-0TROgQ1/SxE6KmxWSvXHvRj90/Xo1JvZShofnYF+f6ZsGtR4eES7WfrQzPalmyagfKZCXpVnitiRebZulWsbiw==",
"requires": {
"inherits": "^2.0.1"
}
},
"ripemd160": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz",
"integrity": "sha512-J7f4wutN8mdbV08MJnXibYpCOPHR+yzy+iQ/AsjMv2j8cLavQ8VGagDFUwwTAdF8FmRKVeNpbTTEwNHCW1g94w==",
"requires": {
"hash-base": "^2.0.0",
"inherits": "^2.0.1"
}
}
}
},
"picocolors": {
@ -12597,6 +12731,16 @@
}
}
},
"to-buffer": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.1.tgz",
"integrity": "sha512-tB82LpAIWjhLYbqjx3X4zEeHN6M8CiuOEy2JY8SEQVdYRe3CCHOFaqrBW1doLDrfpWhplcW7BL+bO3/6S3pcDQ==",
"requires": {
"isarray": "^2.0.5",
"safe-buffer": "^5.2.1",
"typed-array-buffer": "^1.0.3"
}
},
"to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@ -12615,6 +12759,16 @@
"prelude-ls": "^1.2.1"
}
},
"typed-array-buffer": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz",
"integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==",
"requires": {
"call-bound": "^1.0.3",
"es-errors": "^1.3.0",
"is-typed-array": "^1.1.14"
}
},
"typescript": {
"version": "5.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
@ -12952,12 +13106,12 @@
}
},
"vue-i18n": {
"version": "11.1.3",
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-11.1.3.tgz",
"integrity": "sha512-Pcylh9z9S5+CJAqgbRZ3EKxFIBIrtY5YUppU722GIT65+Nukm0TCqiQegZnNLCZkXGthxe0cpqj0AoM51H+6Gw==",
"version": "11.1.11",
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-11.1.11.tgz",
"integrity": "sha512-LvyteQoXeQiuILbzqv13LbyBna/TEv2Ha+4ZWK2AwGHUzZ8+IBaZS0TJkCgn5izSPLcgZwXy9yyTrewCb2u/MA==",
"requires": {
"@intlify/core-base": "11.1.3",
"@intlify/shared": "11.1.3",
"@intlify/core-base": "11.1.11",
"@intlify/shared": "11.1.11",
"@vue/devtools-api": "^6.5.0"
}
},

View file

@ -1,6 +1,6 @@
{
"name": "keanuapp-weblite",
"version": "0.1.59",
"version": "0.1.60",
"private": true,
"scripts": {
"dev": "vite",
@ -28,7 +28,7 @@
"linkify-html": "^4.1.0",
"linkifyjs": "^4.1.0",
"material-design-icons-iconfont": "^6.7.0",
"matrix-js-sdk": "^37.6.0",
"matrix-js-sdk": "^37.12.0",
"md-gum-polyfill": "^1.0.0",
"path-browserify": "^1.0.1",
"pretty-bytes": "^5.6.0",

View file

@ -1,6 +1,6 @@
{
"name": "keanuapp-weblite",
"version": "0.1.58",
"version": "0.1.59",
"private": true,
"scripts": {
"dev": "vite",
@ -28,7 +28,7 @@
"linkify-html": "^4.1.0",
"linkifyjs": "^4.1.0",
"material-design-icons-iconfont": "^6.7.0",
"matrix-js-sdk": "^37.6.0",
"matrix-js-sdk": "^37.12.0",
"md-gum-polyfill": "^1.0.0",
"path-browserify": "^1.0.1",
"pretty-bytes": "^5.6.0",

View file

@ -45,6 +45,7 @@
"loading": "Loading {appName}",
"user_kick_and_ban": "Kick out",
"user_make_admin": "Make admin",
"user_revoke_admin": "Revoke admin",
"user_make_moderator": "Make moderator",
"user_revoke_moderator": "Revoke moderator",
"pin": "Pin post",
@ -354,6 +355,7 @@
"version_info": "Powered by Guardian Project. Version: {version}",
"scan_code": "Scan to join the room",
"export_room": "Save chat",
"user_creator": "Creator",
"user_admin": "Administrator",
"user_moderator": "Moderator",
"moderation": "Moderation",
@ -388,6 +390,7 @@
"report_info": "Report this room to service administrators for illegal, abusive or otherwise harmful content",
"report_reason": "Reason",
"confirm_make_admin": "Do you want to make this user an administrator?",
"confirm_revoke_admin": "Do you want to remove administrator rights from this user?",
"confirm_make_moderator": "Do you want to make this user a moderator?",
"confirm_revoke_moderator": "Do you want to remove moderator rights from this user?",
"confirm_ban": "Do you want to kick this user from the room?"

View file

@ -699,7 +699,7 @@ export default {
roomCreatedByUsRecently() {
const createEvent = this.room && this.room.currentState.getStateEvents("m.room.create", "");
if (createEvent) {
const creatorId = createEvent.getContent().creator;
const creatorId = createEvent.getSender();
return (creatorId == this.$matrix.currentUserId && createEvent.getLocalAge() < 5 * 60000 /* 5 minutes */);
}
return false;
@ -1367,6 +1367,24 @@ export default {
},
sendMessage(text) {
//TEMP TEMP TEMP
if (text.startsWith("/version") && this.room && this.room.userMayUpgradeRoom(this.$matrix.currentUserId)) {
this.room.getRecommendedVersion().then((v) => {
console.error("Room version:", this.room.getVersion());
console.error("Recommended:", v);
});
this.$matrix.matrixClient.getCapabilities().then((c) => {
console.error("Capabilities:", c);
});
return;
}
if (text.startsWith("/upgrade ") && this.room && this.room.userMayUpgradeRoom(this.$matrix.currentUserId)) {
const version = text.substring(9);
this.$matrix.matrixClient.upgradeRoom(this.roomId, version).then((r) => {
console.error("Upgrade result", JSON.stringify(r));
})
return;
}
if (text && text.length > 0) {
util
.sendTextMessage(this.$matrix.matrixClient, this.roomId, text, this.editedEvent, this.replyToEvent)

View file

@ -98,7 +98,7 @@ export default {
generateAliasForRoom() {
return true;
},
getRoomCreationOptions() {
getRoomCreationOptions(roomVersion) {
const createRoomOptions = {
visibility: "private", // Not listed!
name: this.roomName,
@ -132,7 +132,9 @@ export default {
// Set power level event. Need to do that here, because we might not have the userId when the options object is created.
const powerLevels = {};
powerLevels[this.$matrix.currentUserId] = 100;
if (roomVersion < 12) {
powerLevels[this.$matrix.currentUserId] = 100;
}
let powerLevelContent = {
users: powerLevels,
events_default: 50,

View file

@ -95,7 +95,7 @@ export default {
generateAliasForRoom() {
return true;
},
getRoomCreationOptions() {
getRoomCreationOptions(roomVersion) {
const createRoomOptions = {
visibility: "private", // Not listed!
name: this.roomName,
@ -142,7 +142,9 @@ export default {
// Set power level event. Need to do that here, because we might not have the userId when the options object is created.
const powerLevels = {};
powerLevels[this.$matrix.currentUserId] = 100;
if (roomVersion < 12) {
powerLevels[this.$matrix.currentUserId] = 100;
}
let powerLevelContent = {
users: powerLevels,
events_default: 0,

View file

@ -277,7 +277,7 @@ export default {
generateAliasForRoom() {
return this.publicRoom;
},
getRoomCreationOptions() {
getRoomCreationOptions(roomVersion) {
var createRoomOptions = {};
if (this.publicRoom) {
createRoomOptions = {
@ -342,7 +342,9 @@ export default {
// Set power level event. Need to do that here, because we might not have the userId when the options object is created.
const powerLevels = {};
powerLevels[this.$matrix.currentUserId] = 100;
if (roomVersion < 12) {
powerLevels[this.$matrix.currentUserId] = 100;
}
let powerLevelContent = {
users: powerLevels,
events_default: 0

View file

@ -217,7 +217,10 @@
})
}}
</span>
<span v-if="isAdmin(member)" class="user-power">
<span v-if="this.room && this.room.getCreator() === member.userId" class="user-power">
{{ $t("room_info.user_creator") }}
</span>
<span v-else-if="isAdmin(member)" class="user-power">
{{ $t("room_info.user_admin") }}
</span>
<span v-else-if="isModerator(member)" class="user-power">
@ -441,18 +444,8 @@ export default {
computed: {
creator() {
if (this.room) {
const createEvent = this.room.currentState.getStateEvents(
"m.room.create",
""
);
if (!createEvent) {
console.warn(
"Room " + this.roomId + " does not have an m.room.create event"
);
return "";
}
const creatorId = createEvent.getContent().creator;
const member = this.room.getMember(creatorId);
const creatorId = this.room.getCreator();
const member = creatorId ? this.room.getMember(creatorId) : undefined;
if (!member) {
return creatorId;
}
@ -540,6 +533,7 @@ export default {
updateMembers() {
if (this.room) {
const creator = this.room.getCreator();
const myUserId = this.$matrix.currentUserId;
this.members = this.room.getJoinedMembers().sort((a, b) => {
// Place ourselves at the top!
@ -549,6 +543,13 @@ export default {
return 1;
}
// Then the creator
if (a.userId === creator) {
return -1;
} else if (b.userId === creator) {
return 1;
}
// Then sort by power level
if (a.powerLevel > b.powerLevel) {
return -1;

View file

@ -53,6 +53,9 @@
<v-btn variant="text" size="x-large" block v-if="activeMember.userId != $matrix.currentUserId && !isAdminComp && canMakeAdminComp" class="start-private-chat clickable d-block text-none justify-start" @click="makeAdmin">
<v-icon start>$vuetify.icons.make_admin</v-icon> {{ $t("menu.user_make_admin") }}
</v-btn>
<v-btn variant="text" size="x-large" block v-if="activeMember.userId != $matrix.currentUserId && isAdminComp && canRevokeAdminComp" class="start-private-chat clickable d-block text-none justify-start" @click="revokeAdmin">
<v-icon start>$vuetify.icons.make_admin</v-icon> {{ $t("menu.user_revoke_admin") }}
</v-btn>
<v-btn variant="text" size="x-large" block v-if="activeMember.userId != $matrix.currentUserId && !isModeratorComp && !isAdminComp && canMakeModeratorComp" class="start-private-chat clickable d-block text-none justify-start" @click="makeModerator">
<v-icon start>$vuetify.icons.make_moderator</v-icon> {{ $t("menu.user_make_moderator") }}
</v-btn>
@ -65,6 +68,7 @@
</v-dialog>
<ConfirmationDialog :message="$t('room_info.confirm_make_admin')" v-model="showConfirmMakeAdmin" v-on:ok="doMakeAdmin" />
<ConfirmationDialog :message="$t('room_info.confirm_revoke_admin')" v-model="showConfirmRevokeAdmin" v-on:ok="doRevokeAdmin" />
<ConfirmationDialog :message="$t('room_info.confirm_make_moderator')" v-model="showConfirmMakeModerator" v-on:ok="doMakeModerator" />
<ConfirmationDialog :message="$t('room_info.confirm_revoke_moderator')" v-model="showConfirmRevokeModerator" v-on:ok="doRevokeModerator" />
<ConfirmationDialog :message="$t('room_info.confirm_ban')" v-model="showConfirmBan" v-on:ok="doBanUser" />
@ -76,6 +80,7 @@ import AuthedImage from "./AuthedImage.vue";
import util from "../plugins/utils";
import RoomDialogBase from "./RoomDialogBase.vue";
import ConfirmationDialog from "./ConfirmationDialog.vue";
import { consoleError } from "vuetify/lib/util/console.mjs";
export default {
name: "UserProfileDialog",
@ -96,12 +101,16 @@ export default {
data() {
return {
showConfirmMakeAdmin: false,
showConfirmRevokeAdmin: false,
showConfirmMakeModerator: false,
showConfirmRevokeModerator: false,
showConfirmBan: false
};
},
computed: {
canRevokeAdminComp () {
return this.canRevokeAdmin(this.activeMember)
},
canRevokeModeratorComp () {
return this.canRevokeModerator(this.activeMember)
},
@ -198,6 +207,19 @@ export default {
}
return false;
},
/**
* Return true if WE can "unmake" the member an administraor (= we are creator of the room)
* @param member
*/
canRevokeAdmin(member) {
if (this.room) {
// TODO - not supposed to parse room versions as int.
const roomVersion = parseInt(this.room.getVersion()?.split(".").reverse()[0] ?? "0");
const myUserId = this.$matrix.currentUserId;
return roomVersion > 11 && this.room.getCreator() === myUserId;
}
return false;
},
/**
* Return true if WE can make the member a moderator
@ -235,6 +257,19 @@ export default {
this.showDialog = false;
}
},
revokeAdmin() {
if (this.room && this.activeMember) {
this.showConfirmRevokeAdmin = true;
this.showDialog = false;
}
},
doRevokeAdmin() {
if (this.room && this.activeMember) {
this.$matrix.revokeAdmin(this.room.roomId, this.activeMember.userId)
this.showDialog = false;
}
},
makeModerator() {
if (this.room && this.activeMember) {
this.showConfirmMakeModerator = true;

View file

@ -88,7 +88,12 @@ export default {
this.preCreateRoom()
.then(() => {
let createRoomOptions = this.getRoomCreationOptions();
return this.$matrix.matrixClient.getCapabilities();
})
.then((caps) => {
const defaultRoomVersion = parseInt(caps["m.room_versions"]?.default ?? "0");
let createRoomOptions = this.getRoomCreationOptions(defaultRoomVersion);
if (this.generateAliasForRoom()) {
// Promise to get a unique alias and use it in room creation options.
//

View file

@ -219,9 +219,16 @@ export default {
updatePermissions() {
if (this.room) {
this.roomJoinRule = this.getRoomJoinRule();
const canChangeAccess =
let canChangeAccess =
this.room.currentState.mayClientSendStateEvent("m.room.join_rules", this.$matrix.matrixClient) &&
this.room.currentState.mayClientSendStateEvent("m.room.guest_access", this.$matrix.matrixClient);
// TODO - not supposed to parse room versions as int.
const roomVersion = parseInt(this.room.getVersion()?.split(".").reverse()[0] ?? "0");
if (roomVersion >= 11 && this.room.getCreator() === this.$matrix.currentUserId) {
canChangeAccess = true;
}
this.userCanChangeJoinRule = canChangeAccess;
this.userCanPurgeRoom = canChangeAccess; //TODO - need different permissions here?
} else {

View file

@ -723,6 +723,15 @@ export default {
}
},
revokeAdmin(roomId, userId) {
if (this.matrixClient && roomId && userId) {
const room = this.getRoom(roomId);
if (room && room.currentState) {
this.matrixClient.setPowerLevel(roomId, userId, 0);
}
}
},
makeModerator(roomId, userId) {
if (this.matrixClient && roomId && userId) {
const room = this.getRoom(roomId);