@ai-matrx/meet 0.11.52 → 0.11.53

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/CHANGELOG.md CHANGED
@@ -1,11 +1,23 @@
1
1
  # Changelog — `@ai-matrx/meet`
2
2
 
3
+ ## 0.11.53
4
+
5
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
6
+ `git diff npm/meet/v0.11.52..npm/meet/v0.11.53 -- apps/shared/meet`).
7
+ No source changes intended and no consumer action required.
8
+
3
9
  ## 0.11.52
4
10
 
5
11
  Automatic changed-only republish (docs/metadata drift since the last tag — see
6
12
  `git diff npm/meet/v0.11.51..npm/meet/v0.11.52 -- apps/shared/meet`).
7
13
  No source changes intended and no consumer action required.
8
14
 
15
+ ## 0.11.51
16
+
17
+ Automatic changed-only republish (docs/metadata drift since the last tag — see
18
+ `git diff npm/meet/v0.11.50..npm/meet/v0.11.51 -- apps/shared/meet`).
19
+ No source changes intended and no consumer action required.
20
+
9
21
  ## 0.11.50
10
22
 
11
23
  Automatic changed-only republish (docs/metadata drift since the last tag — see
package/dist/core.cjs CHANGED
@@ -3835,6 +3835,7 @@ function consentPending(policy, role, recordingOn, given) {
3835
3835
  function mayAdmitNow(role, participants, policy) {
3836
3836
  if (role === "none") return false;
3837
3837
  if (role === "host" || role === "cohost") return true;
3838
+ if (role === "viewer") return false;
3838
3839
  const hostIn = participants.some((p) => p.role === "host" || p.role === "cohost");
3839
3840
  return !hostIn && policy.headlessPowers === "members_admit";
3840
3841
  }
@@ -5539,6 +5540,17 @@ function createMeetingSession(options) {
5539
5540
  }
5540
5541
  return identity.userId;
5541
5542
  }
5543
+ function requireAdmitterUser(operation) {
5544
+ const snapshot = store.snapshot();
5545
+ if (identity.userId === null || !mayAdmitNow(effectiveRole(snapshot), snapshot.participants, snapshot.livePolicy)) {
5546
+ throw new MeetError(
5547
+ "forbidden",
5548
+ `${operation}: this participant may not let people in`,
5549
+ "Only a host or co-host admits people, unless the meeting has no host in it and lets members admit."
5550
+ );
5551
+ }
5552
+ return identity.userId;
5553
+ }
5542
5554
  function requireMeeting(operation) {
5543
5555
  const meeting = store.snapshot().meeting;
5544
5556
  if (meeting === null) {
@@ -5945,7 +5957,7 @@ function createMeetingSession(options) {
5945
5957
  meetingChannel.requestBackfill("manual");
5946
5958
  },
5947
5959
  async admit(entry, admitted) {
5948
- const by = requireHostUser("meet.admit");
5960
+ const by = requireAdmitterUser("meet.admit");
5949
5961
  const meeting = requireMeeting("meet.admit");
5950
5962
  const row = await repository.decideAdmission({
5951
5963
  meetingId: meeting.id,
@@ -5963,7 +5975,7 @@ function createMeetingSession(options) {
5963
5975
  hint();
5964
5976
  },
5965
5977
  async undeny(entry) {
5966
- const by = requireHostUser("meet.undeny");
5978
+ const by = requireAdmitterUser("meet.undeny");
5967
5979
  const meeting = requireMeeting("meet.undeny");
5968
5980
  const row = await repository.decideAdmission({
5969
5981
  meetingId: meeting.id,
@@ -5976,7 +5988,7 @@ function createMeetingSession(options) {
5976
5988
  hint();
5977
5989
  },
5978
5990
  async admitAll() {
5979
- const by = requireHostUser("meet.admitAll");
5991
+ const by = requireAdmitterUser("meet.admitAll");
5980
5992
  const meeting = requireMeeting("meet.admitAll");
5981
5993
  const rows = await repository.admitAll(meeting.id, by);
5982
5994
  for (const row of rows) {