@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/react.js CHANGED
@@ -1726,6 +1726,15 @@ function createMeetingSession(options) {
1726
1726
  const { manager, repository, store, identity } = options;
1727
1727
  let channel = null;
1728
1728
  let meetingChannel = null;
1729
+ async function readMeeting(meetingId) {
1730
+ try {
1731
+ return await repository.meeting(meetingId);
1732
+ } catch (error) {
1733
+ const slug = store.snapshot().meeting?.slug;
1734
+ if (slug === void 0) throw error;
1735
+ return repository.meetingBySlug(slug);
1736
+ }
1737
+ }
1729
1738
  function requireHostUser(operation) {
1730
1739
  if (identity.userId === null || !isHostRole(effectiveRole(store.snapshot()))) {
1731
1740
  throw new MeetError(
@@ -1806,7 +1815,7 @@ function createMeetingSession(options) {
1806
1815
  onBackfill: async () => {
1807
1816
  const meeting = store.snapshot().meeting;
1808
1817
  if (meeting === null) return;
1809
- const fresh = isGuest(identity) ? await repository.meetingBySlug(meeting.slug) : await repository.meeting(meeting.id);
1818
+ const fresh = isGuest(identity) ? await repository.meetingBySlug(meeting.slug) : await readMeeting(meeting.id);
1810
1819
  store.patch({ meeting: fresh, locked: fresh.locked });
1811
1820
  }
1812
1821
  });
@@ -1901,7 +1910,7 @@ function createMeetingSession(options) {
1901
1910
  // a recovered surface from looking healthy and being wrong.
1902
1911
  onBackfill: async () => {
1903
1912
  const [meeting, transcript, notes, recordings, attendees] = await Promise.all([
1904
- repository.meeting(meetingId),
1913
+ readMeeting(meetingId),
1905
1914
  repository.transcript(meetingId),
1906
1915
  repository.notes(meetingId),
1907
1916
  repository.recordings(meetingId),