@ai-matrx/meet 0.11.33 → 0.11.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.d.cts CHANGED
@@ -2196,7 +2196,7 @@ interface MeetingSession {
2196
2196
  * §3.4 ER: what the server recorded for THIS connection's exit, and the run's phase. null =
2197
2197
  * the read failed (offline / unreachable); undefined = no meeting or no pass to ask with.
2198
2198
  */
2199
- readExit(connection: string): Promise<ExitServerWord | null | undefined>;
2199
+ readExit(connection: string, pass?: string | null): Promise<ExitServerWord | null | undefined>;
2200
2200
  /** Stop waiting: the row becomes `withdrawn` (`POST /v1/meet/leave {intent: "withdraw"}`). */
2201
2201
  withdraw(): Promise<void>;
2202
2202
  /** Ask again after a denial or an expired knock (only offered when allowed). */
@@ -2469,7 +2469,7 @@ interface RoomEngineOptions {
2469
2469
  * read what happened to THIS connection (`GET /v1/meet/state?connection=`). Resolves null when
2470
2470
  * the read failed (offline / unreachable), undefined when this room has no state read (a call).
2471
2471
  */
2472
- readExit?: ((connection: string) => Promise<ExitServerWord | null | undefined>) | undefined;
2472
+ readExit?: ((connection: string, pass?: string | null) => Promise<ExitServerWord | null | undefined>) | undefined;
2473
2473
  /** Was the page frozen when the connection dropped (Page Lifecycle)? → `inactive`. */
2474
2474
  wasFrozen?: (() => boolean) | undefined;
2475
2475
  /**
package/dist/core.d.ts CHANGED
@@ -2196,7 +2196,7 @@ interface MeetingSession {
2196
2196
  * §3.4 ER: what the server recorded for THIS connection's exit, and the run's phase. null =
2197
2197
  * the read failed (offline / unreachable); undefined = no meeting or no pass to ask with.
2198
2198
  */
2199
- readExit(connection: string): Promise<ExitServerWord | null | undefined>;
2199
+ readExit(connection: string, pass?: string | null): Promise<ExitServerWord | null | undefined>;
2200
2200
  /** Stop waiting: the row becomes `withdrawn` (`POST /v1/meet/leave {intent: "withdraw"}`). */
2201
2201
  withdraw(): Promise<void>;
2202
2202
  /** Ask again after a denial or an expired knock (only offered when allowed). */
@@ -2469,7 +2469,7 @@ interface RoomEngineOptions {
2469
2469
  * read what happened to THIS connection (`GET /v1/meet/state?connection=`). Resolves null when
2470
2470
  * the read failed (offline / unreachable), undefined when this room has no state read (a call).
2471
2471
  */
2472
- readExit?: ((connection: string) => Promise<ExitServerWord | null | undefined>) | undefined;
2472
+ readExit?: ((connection: string, pass?: string | null) => Promise<ExitServerWord | null | undefined>) | undefined;
2473
2473
  /** Was the page frozen when the connection dropped (Page Lifecycle)? → `inactive`. */
2474
2474
  wasFrozen?: (() => boolean) | undefined;
2475
2475
  /**
package/dist/core.js CHANGED
@@ -5180,9 +5180,9 @@ function createMeetingSession(options) {
5180
5180
  },
5181
5181
  stopWaiting,
5182
5182
  readState: readState2,
5183
- async readExit(connection) {
5183
+ async readExit(connection, held) {
5184
5184
  const meeting = store.snapshot().meeting;
5185
- const pass = options.resolvePass?.() ?? null;
5185
+ const pass = held ?? options.resolvePass?.() ?? null;
5186
5186
  if (meeting === null || pass === null) return void 0;
5187
5187
  try {
5188
5188
  const response = await options.api.request({
@@ -6530,6 +6530,7 @@ function createRoomEngine(options) {
6530
6530
  };
6531
6531
  async function resolveExitAndApply(hint) {
6532
6532
  const connection = current?.connectionIdentity ?? current?.identity ?? store.snapshot().localIdentity ?? null;
6533
+ const heldPass = current?.meetingPass ?? null;
6533
6534
  lastRequest = requestAsNow();
6534
6535
  await dropRoom();
6535
6536
  let server;
@@ -6537,7 +6538,7 @@ function createRoomEngine(options) {
6537
6538
  server = void 0;
6538
6539
  } else {
6539
6540
  try {
6540
- server = await options.readExit(connection);
6541
+ server = await options.readExit(connection, heldPass);
6541
6542
  } catch {
6542
6543
  server = null;
6543
6544
  }