Skip to content

Commit eebf334

Browse files
authored
ENG-1076 Variability in roam URLs (#562)
* eng-1076: generate roam URL from name instead of getting name from Url.
1 parent 45b25d8 commit eebf334

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/roam/src/utils/supabaseContext.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export type SupabaseContext = {
2727

2828
let _contextCache: SupabaseContext | null = null;
2929

30+
const ROAM_URL_PREFIX = "https://roamresearch.com/#/app/";
31+
3032
const getOrCreateSpacePassword = () => {
3133
const settingsConfigPageUid = getPageUidByPageTitle(
3234
DISCOURSE_CONFIG_PAGE_TITLE,
@@ -54,8 +56,8 @@ export const getSupabaseContext = async (): Promise<SupabaseContext | null> => {
5456
const spacePassword = getOrCreateSpacePassword();
5557
const personEmail = getCurrentUserEmail();
5658
const personName = getCurrentUserDisplayName();
57-
const url = getRoamUrl();
5859
const spaceName = window.roamAlphaAPI.graph.name;
60+
const url = ROAM_URL_PREFIX + spaceName;
5961
const platform: Platform = "Roam";
6062
const spaceResult = await fetchOrCreateSpaceDirect({
6163
password: spacePassword,

0 commit comments

Comments
 (0)