snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
Some checks failed
Prosody Plugin Tests / test (push) Failing after 10m11s
Close stale issues and PRs / stale (push) Failing after 1s

This commit is contained in:
upstream-mirror
2026-09-15 15:56:32 +05:00
commit 1d2bfcac0c
3159 changed files with 464524 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
export * from './functions';
import { getDisplayName, getSpaceUsage } from './functions';
import logger from './logger';
/**
* Information related to the user's dropbox account.
*/
type DropboxUserData = {
/**
* The available space left in MB into the user's Dropbox account.
*/
spaceLeft: number;
/**
* The display name of the user in Dropbox.
*/
userName: string;
};
/**
* Fetches information about the user's dropbox account.
*
* @param {string} token - The dropbox access token.
* @param {string} appKey - The Jitsi Recorder dropbox app key.
* @returns {Promise<DropboxUserData|undefined>}
*/
export function getDropboxData(
token: string,
appKey: string
): Promise<DropboxUserData | undefined> {
return Promise.all(
[ getDisplayName(token, appKey), getSpaceUsage(token, appKey) ]
).then(([ userName, space ]) => {
const { allocated, used } = space;
return {
userName,
spaceLeft: Math.floor((allocated - used) / 1048576)// 1MiB=1048576B
};
}, error => {
logger.error(error);
return undefined;
});
}