mirror of
https://github.com/mattermost/mattermost-mobile.git
synced 2026-11-11 05:30:12 +00:00
* [MM-68986] Add module to collect Session Attributes from Mobile App * PR feedback * Add license downgrade check * Fix android build --------- Co-authored-by: Mattermost Build <build@mattermost.com>
18 lines
696 B
TypeScript
18 lines
696 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import NetworkManager from '@managers/network_manager';
|
|
import {getFullErrorMessage} from '@utils/errors';
|
|
import {logDebug} from '@utils/log';
|
|
|
|
export const fetchSessionAttributesManifest = async (serverUrl: string): Promise<{manifest?: SAField[]; error?: unknown}> => {
|
|
try {
|
|
const client = NetworkManager.getClient(serverUrl);
|
|
const manifest = await client.getSessionAttributesManifest();
|
|
return {manifest};
|
|
} catch (error) {
|
|
logDebug('error on fetchSessionAttributesManifest', getFullErrorMessage(error));
|
|
return {error};
|
|
}
|
|
};
|