2024-06-19 21:21:40 +08:00
|
|
|
import Storage from '/imports/ui/services/storage/session';
|
|
|
|
|
2024-03-07 01:28:18 +08:00
|
|
|
export const JoinErrorCodeTable = {
|
|
|
|
NOT_EJECT: 'not_eject_reason',
|
|
|
|
DUPLICATE_USER: 'duplicate_user_in_meeting_eject_reason',
|
|
|
|
PERMISSION_FAILED: 'not_enough_permission_eject_reason',
|
|
|
|
EJECT_USER: 'user_requested_eject_reason',
|
|
|
|
SYSTEM_EJECT_USER: 'system_requested_eject_reason',
|
|
|
|
VALIDATE_TOKEN: 'validate_token_failed_eject_reason',
|
|
|
|
USER_INACTIVITY: 'user_inactivity_eject_reason',
|
|
|
|
BANNED_USER_REJOINING: 'banned_user_rejoining_reason',
|
|
|
|
USER_LOGGED_OUT: 'user_logged_out_reason',
|
|
|
|
MAX_PARTICIPANTS: 'max_participants_reason',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const setUserDataToSessionStorage = (userData: {
|
|
|
|
meetingId: string,
|
|
|
|
userId: string,
|
|
|
|
authToken: string,
|
|
|
|
logoutUrl: string,
|
|
|
|
sessionToken: string,
|
|
|
|
userName: string,
|
|
|
|
extId: string,
|
|
|
|
meetingName: string,
|
2024-05-03 20:31:18 +08:00
|
|
|
customLogoUrl: string,
|
2024-03-07 01:28:18 +08:00
|
|
|
}) => {
|
|
|
|
sessionStorage.setItem('meetingId', userData.meetingId);
|
|
|
|
sessionStorage.setItem('userId', userData.userId);
|
|
|
|
sessionStorage.setItem('logoutUrl', userData.logoutUrl);
|
|
|
|
sessionStorage.setItem('sessionToken', userData.sessionToken);
|
|
|
|
sessionStorage.setItem('userName', userData.userName);
|
|
|
|
sessionStorage.setItem('extId', userData.extId);
|
|
|
|
sessionStorage.setItem('meetingName', userData.meetingName);
|
2024-06-19 21:21:40 +08:00
|
|
|
Storage.setItem('CustomLogoUrl', userData.customLogoUrl);
|
2024-03-07 01:28:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
export default {
|
|
|
|
JoinErrorCodeTable,
|
|
|
|
setUserDataToSessionStorage,
|
|
|
|
};
|