Skip to content

SDK: gate relay rejoin behind pair:hello capability flag #16

@MichaelLod

Description

@MichaelLod

The SDK now tries to rejoin a persisted relay room on page refresh. This works against mobile builds from main (#14) but hangs ~120 s against older App Store / Play Store phones that reset their paired state on peer:status offline.

Proposed fix

Have the phone advertise capabilities: { rejoin: true } inside relay:pair:hello. The SDK persists the flag with the relay session in sessionStorage and only attempts rejoin when it was present at initial pair.

  • Phone ≥ v0.7.3 → flag set → refresh rejoins seamlessly.
  • Phone < v0.7.3 → flag missing → SDK falls through to vault / connect screen (current pre-rejoin behavior).

Files

  • packages/sdk/src/byoky.ts — read msg.capabilities at relay:pair:hello; persist into RelaySessionData; gate rejoinRelaySession on it.
  • packages/ios/Byoky/Services/RelayPairService.swift — include capabilities in sendPairHello.
  • packages/android/app/src/main/java/com/byoky/app/relay/RelayPairService.kt — same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions