Quick save of changes for IDAA

This commit is contained in:
Scott Idem
2025-12-04 11:24:39 -05:00
parent 0fcd4e4cdf
commit c1a440df6c
2 changed files with 47 additions and 11 deletions

View File

@@ -115,5 +115,8 @@
"width",
"zIndex"
],
"explorer.fileNesting.enabled": false
"explorer.fileNesting.enabled": false,
"cSpell.words": [
"prejoin"
]
}

View File

@@ -48,36 +48,69 @@
async function getJitsiJwt() {
const tokenEndpoint = 'https://api.oneskyit.com/api/jitsi_token';
// This payload now correctly separates features, settings, and config overrides.
// This payload now correctly user, separates features, settings, and config overrides.
// The backend will place these into the correct locations in the JWT.
const payload = {
room: room_name,
name: display_name,
email: email,
is_moderator: is_moderator,
// This is used by the API backend to identify the room and user role. It may override some of the other fields below.
name: display_name, // SPECIAL use: Handled by the backend to set 'name' in the 'users' section. May be truncated or modified. This actual property will be removed by the backend.
email: email, // SPECIAL use: Handled by the backend to set 'email' in the 'users' section. This actual property will be removed by the backend.
is_moderator: is_moderator, // SPECIAL use: Handled by the backend to set 'moderator' in the 'users' section. This actual property will be removed by the backend.
room: room_name, // CHECKED by API: The room the user is joining. Checked by the backend.
// *BEGIN* 'context'
// The 'context' is being built below, but will be adjusted by the backend as needed. It will be put under the 'context' property in the JWT.
// 'users': For adding users to the JWT (if needed)???
// This is partially handled by the backend for now, so no need to send 'users' here. This need to be changed later. Not sure yet... However, if it is sent with the payload, the backend should merge it appropriately. Mainly it will likely overwrite the 'moderator' or 'id' fields.
user: {
// Example user structure:
// id: 'user-id-123',
// name: 'User Name',
// avatar: 'https://example.com/avatar.png',
// email: 'test@example.com',
// moderator: true
id: room_name + '_' + (is_moderator ? 'mod' : 'user') + '_' + Math.floor(Math.random() * 10000),
name: display_name,
// avatar: 'https://example.com/avatar.png', // Not used at this time
email: email,
moderator: true
},
// 'features': For enabling/disabling major Jitsi tools
features: {
livestreaming: false,
recording: false,
transcription: false,
'outbound-call': false,
},
// 'settings': For moderator default checkboxes in the settings panel
settings: {
startMuted: true, // Corresponds to "Everyone starts muted"
startHidden: true, // Corresponds to "Everyone starts hidden"
followMe: false, // Corresponds to "Everyone follows me"
reactionsMuted: true // Corresponds to "Mute reaction sounds for everyone"
// followMe: false, // Corresponds to "Everyone follows me"
reactionsMuted: true, // Corresponds to "Mute reaction sounds for everyone"
},
// *END* 'context'
// 'config': For overriding properties from the server's config.js file
config: {
// This disables the reactions feature entirely. If you want reactions to be
// This disables the reactions feature entirely??? If you want reactions to be
// available but just have the sounds muted by default, set this to 'false'.
disableReactions: true,
}
// disableReactions: true,
'prejoinConfig.enabled': false,
},
// 'aud': 'my_jitsi_app_id', // For reference only - handled by backend
// 'iss': 'my_jitsi_app_id', // For reference only - handled by backend
// 'sub': 'jitsi.dgrzone.com', // For reference only - handled by backend
// 'room': '*', // For reference only - handled by a mix of frontend and backend
// 'exp': 1672531199, // For reference only - handled by backend
// 'nbf': 1672444800 // For reference only - handled by backend
};
try {