// A globally-unique identifier for THIS app. Trystero uses it (together with // the room id) to derive the Nostr topics peers use to find each other, so it // should be unique enough not to collide with other Trystero apps on the public // Nostr relays. Change this if you fork the demo. export const APP_ID = 'trystero-messaging-demo-7c1f9a' // The default room everyone lands in. Because the requirement is "whoever opens // the app sees everyone else", we put all visitors in one shared room by // default. You can still create a private room by adding `#myroom` to the URL. export const DEFAULT_ROOM = 'lobby' // Read the desired room id from the URL hash (e.g. https://.../#dev-room) so you // can demo multiple isolated rooms without any UI, falling back to the default. export const getRoomFromUrl = (): string => { const hash = window.location.hash.replace(/^#/, '').trim() return hash || DEFAULT_ROOM }