mirror of
https://github.com/vector-im/element-web.git
synced 2025-11-09 12:41:07 +01:00
Remove allowVoipWithNoMedia feature flag (#31087)
* Remove allowVoipWithNoMedia feature flag * whoops * remove a string
This commit is contained in:
parent
8376e43a03
commit
dae5b6b43b
@ -1474,7 +1474,6 @@
|
|||||||
"upload_file": "Upload a file"
|
"upload_file": "Upload a file"
|
||||||
},
|
},
|
||||||
"labs": {
|
"labs": {
|
||||||
"allow_screen_share_only_mode": "Allow screen share only mode",
|
|
||||||
"ask_to_join": "Enable ask to join",
|
"ask_to_join": "Enable ask to join",
|
||||||
"automatic_debug_logs": "Automatically send debug logs on any error",
|
"automatic_debug_logs": "Automatically send debug logs on any error",
|
||||||
"automatic_debug_logs_decryption": "Automatically send debug logs on decryption errors",
|
"automatic_debug_logs_decryption": "Automatically send debug logs on decryption errors",
|
||||||
|
|||||||
@ -704,10 +704,6 @@ export class ElementCall extends Call {
|
|||||||
params.append("allowIceFallback", "true");
|
params.append("allowIceFallback", "true");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SettingsStore.getValue("feature_allow_screen_share_only_mode")) {
|
|
||||||
params.append("allowVoipWithNoMedia", "true");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set custom fonts
|
// Set custom fonts
|
||||||
if (SettingsStore.getValue("useSystemFont")) {
|
if (SettingsStore.getValue("useSystemFont")) {
|
||||||
SettingsStore.getValue("systemFont")
|
SettingsStore.getValue("systemFont")
|
||||||
|
|||||||
@ -222,7 +222,6 @@ export interface Settings {
|
|||||||
"feature_element_call_video_rooms": IFeature;
|
"feature_element_call_video_rooms": IFeature;
|
||||||
"feature_group_calls": IFeature;
|
"feature_group_calls": IFeature;
|
||||||
"feature_disable_call_per_sender_encryption": IFeature;
|
"feature_disable_call_per_sender_encryption": IFeature;
|
||||||
"feature_allow_screen_share_only_mode": IFeature;
|
|
||||||
"feature_location_share_live": IFeature;
|
"feature_location_share_live": IFeature;
|
||||||
"feature_dynamic_room_predecessors": IFeature;
|
"feature_dynamic_room_predecessors": IFeature;
|
||||||
"feature_render_reaction_images": IFeature;
|
"feature_render_reaction_images": IFeature;
|
||||||
@ -644,16 +643,6 @@ export const SETTINGS: Settings = {
|
|||||||
displayName: _td("labs|feature_disable_call_per_sender_encryption"),
|
displayName: _td("labs|feature_disable_call_per_sender_encryption"),
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
"feature_allow_screen_share_only_mode": {
|
|
||||||
isFeature: true,
|
|
||||||
labsGroup: LabGroup.VoiceAndVideo,
|
|
||||||
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG_PRIORITISED,
|
|
||||||
supportedLevelsAreOrdered: true,
|
|
||||||
description: _td("labs|under_active_development"),
|
|
||||||
displayName: _td("labs|allow_screen_share_only_mode"),
|
|
||||||
controller: new ReloadOnChangeController(),
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
"feature_location_share_live": {
|
"feature_location_share_live": {
|
||||||
isFeature: true,
|
isFeature: true,
|
||||||
labsGroup: LabGroup.Messaging,
|
labsGroup: LabGroup.Messaging,
|
||||||
|
|||||||
@ -642,28 +642,6 @@ describe("ElementCall", () => {
|
|||||||
expect(urlParams.get("analyticsID")).toBeFalsy();
|
expect(urlParams.get("analyticsID")).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("passes feature_allow_screen_share_only_mode setting to allowVoipWithNoMedia url param", async () => {
|
|
||||||
// Now test with the preference set to true
|
|
||||||
const originalGetValue = SettingsStore.getValue;
|
|
||||||
SettingsStore.getValue = (name: SettingKey, roomId: string | null = null, excludeDefault = false): any => {
|
|
||||||
switch (name) {
|
|
||||||
case "feature_allow_screen_share_only_mode":
|
|
||||||
return true;
|
|
||||||
default:
|
|
||||||
return excludeDefault
|
|
||||||
? originalGetValue(name, roomId, excludeDefault)
|
|
||||||
: originalGetValue(name, roomId, excludeDefault);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
ElementCall.create(room);
|
|
||||||
const call = Call.get(room);
|
|
||||||
if (!(call instanceof ElementCall)) throw new Error("Failed to create call");
|
|
||||||
|
|
||||||
const urlParams = new URLSearchParams(new URL(call.widget.url).hash.slice(1));
|
|
||||||
expect(urlParams.get("allowVoipWithNoMedia")).toBe("true");
|
|
||||||
SettingsStore.getValue = originalGetValue;
|
|
||||||
});
|
|
||||||
|
|
||||||
it("passes empty analyticsID if the id is not in the account data", async () => {
|
it("passes empty analyticsID if the id is not in the account data", async () => {
|
||||||
client.getAccountData.mockImplementation((eventType: string) => {
|
client.getAccountData.mockImplementation((eventType: string) => {
|
||||||
if (eventType === PosthogAnalytics.ANALYTICS_EVENT_TYPE) {
|
if (eventType === PosthogAnalytics.ANALYTICS_EVENT_TYPE) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user