diff options
author | RaindropsSys <contact@minteck.org> | 2023-04-24 14:03:36 +0200 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-04-24 14:03:36 +0200 |
commit | 633c92eae865e957121e08de634aeee11a8b3992 (patch) | |
tree | 09d881bee1dae0b6eee49db1dfaf0f500240606c /includes/external/matrix/node_modules/matrix-js-sdk/lib/feature.js.map | |
parent | c4657e4509733699c0f26a3c900bab47e915d5a0 (diff) | |
download | pluralconnect-633c92eae865e957121e08de634aeee11a8b3992.tar.gz pluralconnect-633c92eae865e957121e08de634aeee11a8b3992.tar.bz2 pluralconnect-633c92eae865e957121e08de634aeee11a8b3992.zip |
Updated 18 files, added 1692 files and deleted includes/system/compare.inc (automated)
Diffstat (limited to 'includes/external/matrix/node_modules/matrix-js-sdk/lib/feature.js.map')
-rw-r--r-- | includes/external/matrix/node_modules/matrix-js-sdk/lib/feature.js.map | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/includes/external/matrix/node_modules/matrix-js-sdk/lib/feature.js.map b/includes/external/matrix/node_modules/matrix-js-sdk/lib/feature.js.map new file mode 100644 index 0000000..e425935 --- /dev/null +++ b/includes/external/matrix/node_modules/matrix-js-sdk/lib/feature.js.map @@ -0,0 +1 @@ +{"version":3,"file":"feature.js","names":["ServerSupport","exports","Feature","featureSupportResolver","Thread","unstablePrefixes","matrixVersion","ThreadUnreadNotifications","LoginTokenRequest","RelationBasedRedactions","AccountDataDeletion","buildFeatureSupportMap","versions","supportMap","Map","feature","supportCondition","Object","entries","_versions$versions$in","_versions$versions","_supportCondition$uns","_supportCondition$uns2","supportMatrixVersion","includes","supportUnstablePrefixes","every","unstablePrefix","_versions$unstable_fe","unstable_features","set","Stable","Unstable","Unsupported"],"sources":["../src/feature.ts"],"sourcesContent":["/*\nCopyright 2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { IServerVersions } from \"./client\";\n\nexport enum ServerSupport {\n Stable,\n Unstable,\n Unsupported,\n}\n\nexport enum Feature {\n Thread = \"Thread\",\n ThreadUnreadNotifications = \"ThreadUnreadNotifications\",\n LoginTokenRequest = \"LoginTokenRequest\",\n RelationBasedRedactions = \"RelationBasedRedactions\",\n AccountDataDeletion = \"AccountDataDeletion\",\n}\n\ntype FeatureSupportCondition = {\n unstablePrefixes?: string[];\n matrixVersion?: string;\n};\n\nconst featureSupportResolver: Record<string, FeatureSupportCondition> = {\n [Feature.Thread]: {\n unstablePrefixes: [\"org.matrix.msc3440\"],\n matrixVersion: \"v1.3\",\n },\n [Feature.ThreadUnreadNotifications]: {\n unstablePrefixes: [\"org.matrix.msc3771\", \"org.matrix.msc3773\"],\n matrixVersion: \"v1.4\",\n },\n [Feature.LoginTokenRequest]: {\n unstablePrefixes: [\"org.matrix.msc3882\"],\n },\n [Feature.RelationBasedRedactions]: {\n unstablePrefixes: [\"org.matrix.msc3912\"],\n },\n [Feature.AccountDataDeletion]: {\n unstablePrefixes: [\"org.matrix.msc3391\"],\n },\n};\n\nexport async function buildFeatureSupportMap(versions: IServerVersions): Promise<Map<Feature, ServerSupport>> {\n const supportMap = new Map<Feature, ServerSupport>();\n for (const [feature, supportCondition] of Object.entries(featureSupportResolver)) {\n const supportMatrixVersion = versions.versions?.includes(supportCondition.matrixVersion || \"\") ?? false;\n const supportUnstablePrefixes =\n supportCondition.unstablePrefixes?.every((unstablePrefix) => {\n return versions.unstable_features?.[unstablePrefix] === true;\n }) ?? false;\n if (supportMatrixVersion) {\n supportMap.set(feature as Feature, ServerSupport.Stable);\n } else if (supportUnstablePrefixes) {\n supportMap.set(feature as Feature, ServerSupport.Unstable);\n } else {\n sup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