A workspace conversation is never remembered, so /admin/bots always reopens the bot's own chat.
This commit is contained in:
@@ -7,14 +7,13 @@ type Params = {
|
||||
};
|
||||
|
||||
/**
|
||||
* The conversation this browser was last in, from the last-visited cookies
|
||||
* (see `lastVisitedBotCookies`). Null when it has none, or when they don't
|
||||
* name a conversation. Whether the user still reaches it is the caller's
|
||||
* The bot this browser was last in, from the last-visited cookie (see
|
||||
* `lastVisitedBotCookies`). Null when it has none, or when it doesn't name
|
||||
* a bot. Whether the user still reaches that bot's own chat is the caller's
|
||||
* check: a stale grant must fall back, never redirect.
|
||||
*/
|
||||
export default function readLastVisitedBot({ req }: Params): LastVisitedBot | null {
|
||||
return parseLastVisitedBot({
|
||||
bot_id: getCookie(req, AppData["LastVisitedBotCookieName"]),
|
||||
workspace_id: getCookie(req, AppData["LastVisitedWorkspaceCookieName"]),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user