@ai-matrx/meet 0.7.1 → 0.7.2

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/index.js CHANGED
@@ -2699,6 +2699,15 @@ function createMeetingSession(options) {
2699
2699
  const { manager, repository, store, identity } = options;
2700
2700
  let channel = null;
2701
2701
  let meetingChannel = null;
2702
+ async function readMeeting(meetingId) {
2703
+ try {
2704
+ return await repository.meeting(meetingId);
2705
+ } catch (error) {
2706
+ const slug = store.snapshot().meeting?.slug;
2707
+ if (slug === void 0) throw error;
2708
+ return repository.meetingBySlug(slug);
2709
+ }
2710
+ }
2702
2711
  function requireHostUser(operation) {
2703
2712
  if (identity.userId === null || !isHostRole(effectiveRole(store.snapshot()))) {
2704
2713
  throw new MeetError(
@@ -2779,7 +2788,7 @@ function createMeetingSession(options) {
2779
2788
  onBackfill: async () => {
2780
2789
  const meeting = store.snapshot().meeting;
2781
2790
  if (meeting === null) return;
2782
- const fresh = isGuest(identity) ? await repository.meetingBySlug(meeting.slug) : await repository.meeting(meeting.id);
2791
+ const fresh = isGuest(identity) ? await repository.meetingBySlug(meeting.slug) : await readMeeting(meeting.id);
2783
2792
  store.patch({ meeting: fresh, locked: fresh.locked });
2784
2793
  }
2785
2794
  });
@@ -2874,7 +2883,7 @@ function createMeetingSession(options) {
2874
2883
  // a recovered surface from looking healthy and being wrong.
2875
2884
  onBackfill: async () => {
2876
2885
  const [meeting, transcript, notes, recordings, attendees] = await Promise.all([
2877
- repository.meeting(meetingId),
2886
+ readMeeting(meetingId),
2878
2887
  repository.transcript(meetingId),
2879
2888
  repository.notes(meetingId),
2880
2889
  repository.recordings(meetingId),