fetchPath

Returns the user's current location within the application. Only supports paths that are located within the /inboxes route.

πŸ“˜

This function is only available on context of types singleConversation and multiConversations

This function is only available on context of types SINGLE_CONVERSATION and MULTI_CONVERSATIONS and messageComposer

Use this function to capture the location of a user within the /inboxes routes. For example, to note which inbox a user is viewing or the current message the user has open. If your plugin navigates the user away from this location, you can pass the response of this location to openUrl to return the user to the location of interest.

function fetchPath(cancelToken?: CancelToken): Promise<string>;

Parameters

ParameterTypeDescription
cancelTokenCancelToken (optional)Token to cancel the request.

Return value

The function returns a Promise that resolves with the current path of the user. Pass this value to openUrl to return the user to the given location within the /inboxes routes at a later point.

Examples

Front.fetchPath(); // Example response: /inboxes/teammates/###/inbox/open/###