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>;
|CancelToken (optional)||Token to cancel the request.|
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.
This function does not return a path when the user is composing a new message in a popover window.
If the user is in the
noConversationPopovercontext, this function returns a value of
composing-newbecause there is no route associated to the user when they are viewing a popped-out composer window for a brand new message they are creating. You cannot use the
composing-newvalue to resolve the user's path or in other functions like openUrl.
Front.fetchPath(); // Example response: /inboxes/teammates/###/inbox/open/###