({ title, description, inviteNodeIds, maxParticipants } = {})
| 13 | } |
| 14 | |
| 15 | createSession({ title, description, inviteNodeIds, maxParticipants } = {}) { |
| 16 | if (!title) throw new Error('title is required'); |
| 17 | |
| 18 | return this.store.send({ |
| 19 | type: 'session_create', |
| 20 | payload: { |
| 21 | title, |
| 22 | description: description || '', |
| 23 | invite_node_ids: Array.isArray(inviteNodeIds) ? inviteNodeIds.slice(0, 10) : [], |
| 24 | max_participants: Math.max(2, Math.min(20, Number(maxParticipants) || 5)), |
| 25 | created_at: new Date().toISOString(), |
| 26 | }, |
| 27 | priority: 'high', |
| 28 | }); |
| 29 | } |
| 30 | |
| 31 | joinSession({ sessionId } = {}) { |
| 32 | if (!sessionId) throw new Error('sessionId is required'); |
no test coverage detected