NexGate Calls & Meetings: revamp requirements

Version: 0.4 · Started: 2026-11-24 · Status: being discussed with the owner; five meeting fixes and two call fixes already built (§2), everything else design only

How calls and meetings should work after the revamp: what NexGate keeps, what it learns from WhatsApp, Telegram, Google Meet, Zoom and Teams, and what it reuses from the live revamp. A living document: every topic we discuss is added here.

Today's technical spec and API: calls_meetings_api_doc.md (repo root). Where this document disagrees with it, this document wins and the API doc is updated when we build. Related: docs/live/LIVE_REVAMP_REQUIREMENTS.md (the live tools meetings reuse), docs/gift/GIFT_SYSTEM_SPEC.md (moment gifts), docs/team/WORK_CALLS.md (work calls).

Marks used

Mark Meaning
✅ Agreed with the owner
🟡 Proposed, waiting for the owner's answer
⬜ Not discussed yet
❌ Decided against
🔨 Built (commit given)

Rules that apply everywhere


0. The picture in one page

Calls (1:1 and group) Meetings
What it is A phone call: it rings A private live: you join at a time, nothing rings
Audio or video chosen by the caller (audio → video possible) ✅ no choice: a meeting is a meeting; everyone switches their own camera and mic
Who Chat contacts (1:1), group chat members, shops, parcel work calls Invited people and link holders, signed in
Size Up to 8 (from settings, C5) Host + up to 8 speakers + many listeners
Style ✅ Light, the WhatsApp way: reactions and raise hand go phone to phone ✅ Same stage and tools as Audio / Video live: co-hosts, requests, mute, invites with privacy, chat, polls, questions, selling, gifts
Inside the room LiveKit (sound, video, data) LiveKit (everyone is in it)
Tools in the room ✅ API in → backend checks → LiveKit SendData out the same
Outside the room (ringing, invites, reminders) SSE when the app is open, push when closed; later Centrifugo's personal channel the same

1. What exists today (checked in code 2026-11-24)

Code: chat_system/calls_mng (calls + meetings), shipping_service/work_calls, team_mng/shop_calls, chat_system/livekit, notification server PushService / FcmPushProvider / ApnsVoipPushProvider.

1.1 Calls

1:1 call Group call Shop call Work call (parcels)
Start POST /calls with a conversation, a person or a shop from a group chat customer calls a shop (from its page) buyer, shop or shipper about one order
Who rings the other person everyone in the group shop terminals + the owner per "Ring on my phone" (always / when nobody's at the shop / never) the people on the parcel
Limit — 8 (app.livekit.group-max-participants); a group over 8 can't call at all (CALL_TOO_LARGE) first to answer wins —
Video ✅ off above 4 people (video-off-above-participants) ✅ ✅
Rules chat contacts only (message requests) — shops can't cold-call customers only while the order is open

1.2 Meetings

1.3 Staging, last 30 days (2026-11-24)

Call Result Count
1:1 audio completed / busy / cancelled / missed / declined 42 / 33 / 32 / 12 / 5
1:1 video completed / busy / cancelled / missed 16 / 7 / 7 / 1
Group audio completed / missed / cancelled 18 / 3 / 3
Group video completed 5
Meetings (video) completed / still scheduled 22 / 5

Health check (2026-11-24): nothing stuck ringing or active, no meeting open past its end, no scheduled meeting that failed to open, no ended call without an outcome. Found and fixed: §2.


2. Fixed on 2026-11-24 (🔨, local on fet/team, unpushed)

# Problem Fix Commit
P1 A meeting for now was saved SCHEDULED; "starting" came up to 30 s late opens OPEN at once f183fa52
P2 Invitees could join days early into an empty room doors open 10 min before the start (NOT_OPEN_YET); the host any time f183fa52
P5 Role change named a person by JID accountId= (the old jid= still works) f183fa52
P7 Edit only title + start; end unchecked; past start became "now"; English words in the notice edit takes description and end; end after start (END_BEFORE_START); past start refused (IN_THE_PAST); notice adds changedFields keys f183fa52
P8 Invitees past 8 quietly became listeners create answer adds speakerLimit + invitedAsListeners f183fa52
B1 BUSY bug: a person counted as on a call while only invited to a meeting (scheduled, or open without them) or rung by an unanswered group call. 29 of 40 BUSY calls in 30 days; one person unreachable for 1:1 calls until 28 Nov busy = in a room now (joined, not left) or being rung by a 1:1; replayed on staging data before changing; work calls too 8299506d
B2 96 people "joined but never left" in ended calls when a call ends, everyone still in the room is marked as left 616346a7

Docs: calls_meetings_api_doc.md ("Changes 2026-11-24"), docs/changelog/frontend_changelog_2026-11-24.md §9–§10. Tests: MeetingFixesTest (5); suite 620 green.


3. Real time: which pipe carries what

✅ Agreed 2026-11-24.

What Pipe Why
Inside a call or meeting: pins, coupon drops, polls, requests list, mute, gifts, meeting chat LiveKit data, sent by our backend (SendData on LiveKit's server API) everyone in a call or meeting is already connected to LiveKit for sound and video
Reactions and raise hand in calls LiveKit data phone to phone (no backend) light, like WhatsApp
Outside the room: ringing, invites, "starting", reminders, "a call is on · Join" SSE when the app is open, push when closed; later Centrifugo's personal channel (live doc §13.4) once it exists reaches people not in the room yet

The rule for every tool in a call or meeting:

 Host taps Pin ──API──► Backend: checks (her shop's product? price? coupon rules? meeting on?) · saves it
                              └──LiveKit SendData (server → room) {event: PIN, productId}──► every phone, within a second
 Someone joins late ──join answer / GET …/pins──► current shelf and pin

Why live is different: live viewers watch through SRS (a one-way video stream, cheap for thousands) which can't carry messages, so live needs Centrifugo; the host and guests are in LiveKit. In meetings every listener is a LiveKit participant, so the data pipe is already there. If a meeting ever had thousands of listeners on SRS, those would need Centrifugo.

LiveKit (calls, meetings, live stage) SRS (live viewers)
Kind two-way room one-way stream, like TV
Cost per person high (streams forwarded to each) very low (copied, cached on edges)
Good for a few to a few hundred who interact hundreds to thousands who watch
Carries messages ✅ data ❌

4. Calls

4.1 What others do that we don't (from what we know, 2026-11-24)

Others do Who Us today
Ring when the app is closed / locked everyone ✅ works (§1.1)
Group call size WhatsApp up to 32; Telegram very large; Meet 100+ 8
Pick who to ring in a group WhatsApp rings everyone; a group over 8 can't call
"Call ongoing · Join" from the chat WhatsApp, Telegram only people rung can join
Add people during any call WhatsApp, Telegram, Meet 1:1 → 3-way only
"Who can call me" Telegram (WhatsApp: "silence unknown callers") only the message-request rule
Missed call → Call back / Message from the notice WhatsApp, Telegram plain notice
Call waiting (a second call while on one) WhatsApp second caller gets BUSY
Works on strict networks (TURN) everyone TURN off on our LiveKit
One Calls tab: history + upcoming WhatsApp history only, meetings without title / time
Screen share, low data mode, raise hand, reactions everyone app work (screen share already allowed by the server)

4.2 Backend list for calls

# What How (backend) Status
C1 Ring when closed built and working (§1.1) ✅ done
C2 Pick who to ring in a group POST /calls gains optional inviteeAccountIds (group chat only, members only, up to the limit); only they ring. A group of 30 can call 8 of them 🟡
C3 "A call is on · Join" the conversation shows the running call (id, kind, who's in, count); any member of the group chat can join while there's room (not only people rung) 🟡
C4 Add people during any call anyone in the call adds contacts (group or 1:1), up to the limit; blocks and "who can call me" apply 🟡
C5 Limits that grow people per call and "video off above" from admin settings in the database, not config; raised without a release 🟡
C6 "Who can call me": everyone / contacts / nobody privacy setting like gifts and live invites; refused calls look the same as a block to the caller 🟡
C7 Missed-call notice with actions the notice carries actions: [CALL_BACK, MESSAGE] + ids; the app draws the buttons 🟡
C8 Call waiting a second 1:1 call rings with waiting: true instead of BUSY; the person ends one and answers, or declines 🟡
C9 TURN on turn on TURN in our LiveKit (infra; the spec deviation noted in memory) 🟡
C10 One Calls tab CallResponse gains title, start, end, my role, access for meetings (fields added, P6); a new "upcoming" list (§6.2) 🟡
— Centrifugo for calls ✅ not needed to work; calls move onto Centrifugo's personal channel after live phase 1 as a tidy-up ✅

4.3 Tools in calls

✅ Agreed 2026-11-24 (owner: "the call needs those tools as listed in the table").

Tool 1:1 call Group call (≤ 8) Backend
Reactions ❤️ 😂 🔥 ✅ ✅ none (phone to phone)
Raise hand ✋ — ✅ none (phone to phone)
Mute others (never unmute), remove + block from this call — ✅ whoever started it server mute / remove through LiveKit
Gifts (moment gifts) ✅ ✅ built (gift spec v6); add place for calls (GiftPlace.MEETING exists; calls reuse it or get CALL)
Pin a product ✅ shop calls ("this one?") — API → check → SendData (§3)
"Weak network, try a new location" ✅ ✅ none (the phone detects it)

Example: Juma calls Asha → ❤️ phone to phone. Asha sends a 🌹 gift during the call → Juma's gift balance. Juma calls Duka la Mama → the shop pins the red kanga → Juma sees the card in the call → taps → checkout ✅


5. Meetings are a private live

✅ Agreed 2026-11-24: a meeting uses the same stage and tools as Audio / Video live, but only invited people and link holders get in, and everyone is in LiveKit (§3). One set of rules for live and meetings: built once.

Live tool (live doc) In meetings Backend
Reactions (§8.2) ✅ counted and mixed every 2 s, sent by SendData
Requests ✋ + "who can ask to speak" (X2, X3, X5) ✅ requests list for host and co-hosts
Co-hosts, max 2 (§8.1a) ✅ new role CO_HOST: accept requests, mute, remove; can't end
Mute, never unmute; back to listener; remove + block (X4, X6) ✅ server mute / remove through LiveKit
Invites with accept + "Who can invite me" (§8A.8–9) ✅ §7
Chat with role badges (§8.7) ✅ §10
Polls, questions with Me too (§8.5, §8.6) ✅ §10
Gifts (gift spec v6) ✅ GiftPlace.MEETING (exists, switched off until built)
Pin, coupon drop, flash price (§7) ✅ a shop's meeting (wholesale session) §11
Weak network bar, speaker weak-network flag (§9.3 N7, N9) ✅ speaker flag to host
Booking, reminders 24 h / 15 min, upcoming list (§4) ✅ §6
Send listeners to another live / meeting (Y8) later —

Example: Duka la Mama holds a wholesale meeting for 40 shop owners → Neema is co-host → owners raise hands → a poll "which colour next month?" → Mama Yoyo pins a kanga and drops a 15% wholesale coupon → Asha sends a 🔥 gift ✅

Meeting topics

# Topic Fixes Status
M1 Invites P3, P4 §7 (✅ mostly)
M2 My meetings, upcoming, reminders P6, P9 §6 🟡
M3 Roles in the room P4 §8 🟡
M4 Waiting room and locks new §9 🟡
M5 Chat, polls, questions, reactions new §10 🟡
M6 Selling and gifts new §11 🟡
M7 Links and "joined by your link" new §12 🟡
M8 Limits from settings new §13 🟡

5a. A meeting is a meeting: no audio / video choice

✅ Owner 2026-11-24: "we don't need Video / Audio, a meeting is a meeting; people can switch".

5b. Banner: optional

✅ Owner 2026-11-24.

App Banner on a meeting
WhatsApp scheduled call no (title and people)
Google Meet / Calendar no
Zoom webinars (public sessions) yes (banner and branding on the sign-up page)
NexGate live yes (agreed)

6. M2: My meetings, upcoming, reminders

🟡 Proposed (reuses live doc §4).


7. M1: Invites

7.1 Today

Asha creates a meeting with Juma, Neema and Rose listed: they're put straight in (push + SSE, no accept, no privacy check, only blocks). She can't add people later or take anyone off (P3, P4).

7.2 What others do (researched 2026-11-24)

Google Calendar / Meet Zoom Teams WhatsApp (scheduled calls)
Answer an invite Yes / No / Maybe; organiser notified, sees every answer — (link or registration) Yes / No / Maybe —
Guests invite others ✅ on by default, organiser can switch off — — —
Guests see who's invited ✅ on by default, can be switched off — ✅ ✅ attendees
Guests propose a new time ✅ organiser reviews it — ✅ —
Invite a whole group ✅ — ✅ ✅ contacts or groups
People not invited knock: ask, host admits or denies (one by one or all) waiting room; or signed-in only; or registration with approval lobby: invited walk in, others wait anyone with the link
Lesson — passcodes in links leak (forwarded); signed-in only + waiting room work better — creator told when someone joins by the link

7.2a Three ways to create a meeting (Google Meet style)

✅ Owner 2026-11-24: "we need all three; schedule is different; the later link is just a link, no people, no content".

How Google Meet does it (from what we know): "New meeting" → Start an instant meeting (you're in at once, a box gives the link and "Add others") · Create a meeting for later (a link only) · Schedule in Google Calendar (the full form).

            [ + New meeting ]
   ┌──────────────────────────────────┐
   │ ⚡ Start now                      │  ← one tap, you're in
   │ 🔗 Link for later                 │  ← one tap, just a link
   │ 📅 Schedule                       │  ← the full form (below)
   └──────────────────────────────────┘

Rules

Examples

7.2b The Schedule form (sample, 2026-11-24)

┌─────────────────────────────────────────┐
│  [ 👤 Mama Yoyo ▾ ]   ← Me / 🛍 Duka la Mama
│                                         │
│  🖼 [ Add a banner (optional) ]          │
│  Title: Wholesale December              │
│  Description: New stock, prices for Dec │
│                                         │
│  When                                   │
│   [ ⚡ Now ] [ Today 17:00 ] [ Tomorrow 10:00 ]
│   [ 🗓 Custom ]                          │
│  Ends   [ 1 h ✓ ] [ 2 h ] [ No end ]     │
│                                         │
│  ── Who ──────────────────────────────  │
│  Invite  [ Asha ✕ ] [ Neema ✕ ] [ + Add ]│  ← only people who allow you
│          [ 👥 + A whole group chat ]     │  ← each member gets their own invite
│  Co-hosts [ Neema ✕ ]  (up to 2)         │
│  People with the link                   │
│   [ Wait for me to let them in ✓ ]      │
│   [ Come straight in ]                  │
│                                         │
│  ── Guests can ───────────────────────  │
│  Invite others                [ OFF ]   │
│  See who's invited            [ ON ]    │
│  Ask to speak  [ Everyone ✓ ] [ People I follow ] [ Only invited ]
│  Start muted                  [ ON ]    │
│                                         │
│  ℹ 8 can speak; more join as listeners. │  ← limit from the backend
│                                         │
│             [ 📅 Create meeting ]        │
└─────────────────────────────────────────┘
          ↓
┌─────────────────────────────────────────┐
│  ✅ Wholesale December · Fri 5 Dec 17:00 │
│  Invites sent: 30 · waiting for answers │
│  [ 🔗 Listener link ] [ 🎙 Speaker link ]│
│  [ ✏️ Edit ] [ ✖ Cancel ]                │
└─────────────────────────────────────────┘

7.3 NexGate meeting invites

✅ Owner 2026-11-24 ("very nice") for I1–I7; I8 later. Copied from group invites and live invites (live doc §8A.8).

# Rule
I1 Answer the invite: Accept / No thanks. 🟡 no "Maybe" (proposed, to keep it simple). A waiting person isn't in the meeting: can't join, gets no meeting notices beyond the invite. The host sees the list ✅ ⏳ ❌ with counts
I2 Host told about answers, grouped: "Juma and 3 others accepted" once, not one push per person
I3 Guest options per meeting: "Guests can invite others" off by default (the host's list stays hers); "Guests see who's invited" on by default. Guest invites follow the same privacy setting
I4 Invite a whole group chat: every member gets their own invite and answers for themself; privacy respected per person
I5 Invited people walk in, others wait: link holders who weren't invited go to the waiting room (§9); the host can turn on "Link joins straight in" for open sessions
I6 Signed in only (already our rule: every link needs a NexGate account; blocks apply)
I7 "Juma joined by your link": one quiet notice to the host per person, grouped if many
I8 Propose a new time

Also (from groups and live):

Example


8. M3: Roles in the room

🟡 Proposed (live doc §8A.4, §8.1a).

Role Can
Host everything: end, cancel, edit, invite, roles, co-hosts, locks, waiting room, selling tools (if a shop)
Co-host (max 2) accept requests, admit from the waiting room, mute, move to listener, remove, invite people already in; can't end or use the host shop's money tools
Speaker talk, camera (within the video limit), screen share
Listener listen, react, chat, raise hand ✋

9. M4: Waiting room and locks

🟡 Proposed (Google Meet, Zoom, Teams).


10. M5: Chat, polls, questions, reactions

🟡 Proposed (live doc §8.2, §8.5–8.7).


11. M6: Selling and gifts

🟡 Proposed.


🟡 Proposed.


13. M8: Limits from settings

🟡 Proposed (with C5).


14. Still open from the code review

# Problem Where it goes
P3 Invitees put straight in, no accept, no privacy §7
P4 No adding people later, no remove, no mute others §7, §8
P6 Meeting answer lacks title, time, access, my role; no upcoming list §6, C10
P9 Only "starting" reminder §6
P10 Never tested on real phones; TURN off C9 + phone test

15. Open questions waiting for the owner

# Question My suggestion
Q1 "Who can invite me": one setting for lives and meetings, or two? one ("Who can invite me to lives and meetings"), contacts only
Q2 Invite answers: Accept / No thanks only, or add Maybe? no Maybe
Q3 C2–C10 for calls: all, and in which order? C9 (TURN), C2, C3, C4, C5, C6, C7, C10, C8
Q4 M2–M8 for meetings: agree one by one M2 → M3 → M4 → M5 → M6 → M7 → M8

16. What the backend needs

16.1 Keep

Calls start / answer / end / add person, ring timeout, settle, CALL_EVENT, webhooks, push (Firebase + Apple VoIP), shop and work calls, meetings create / join / links / roles / end / cancel / edit, the schedule job.

16.2 Change (fields only added)

What Change
POST /calls + inviteeAccountIds (C2)
Group call join any group member while there's room (C3)
Add person any call, anyone in it (C4)
CallResponse + title, scheduledAt, endsAt, access, myRole for meetings (C10, P6)
Missed-call notice + actions (C7)
Second 1:1 call rings with waiting: true instead of BUSY (C8)
Limits from admin settings (C5, M8)
Meeting create + mode (NOW / LINK / SCHEDULED, §7.2a): NOW returns link + host token, LINK has no time and no invites (30 days); empty title allowed for NOW / LINK; + optional coverMediaId (banner, §5b; also in Edit); no audio / video choice: always camera-capable (kind accepted, ignored; §5a); invitees become invites (waiting) instead of participants; + guestsCanInvite, guestsSeeInvited, linkJoinsStraightIn, whoCanAskToSpeak, inviteChatId (whole group chat)

16.3 New

Topic Endpoints / pieces
Invites answer (accept / no thanks), my invites list, add / withdraw / remove, grouped answers to the host, "Who can invite me" (shared with live, Q1), 20 a day
My meetings GET /meetings/mine, Calls tab upcoming, reminders 24 h / 15 min (live ReminderLead)
Roles CO_HOST; requests list; mute (server), back to listener, remove + block
Waiting room and locks ask to join, admit / deny / admit all, locks, lock meeting
In-room tools SendData in LiveKitClient; pins, polls, questions, chat, reactions, gifts, selling (API in → check → SendData)
Calls "Who can call me" (C6); running call on the conversation (C3)
Notifications (workbook) meeting invite answered (grouped), removed, invite withdrawn, reminder 24 h / 15 min, host get ready, joined by your link, waiting room knock (to host), call waiting

17. Sources (read 2026-11-24)


Change log

Version Date What
0.1 2026-11-24 First write-up: today's calls and meetings, staging numbers, the seven fixes built today (P1, P2, P5, P7, P8, BUSY, left time), real-time pipes (LiveKit in the room, SendData from the backend; Centrifugo only for live viewers), calls C1 done and C2–C10, tools in calls, meetings as a private live with the live tools, M1 invites (I1–I7 agreed, research on Google, Zoom, Teams, WhatsApp), M2–M8 proposed, open questions Q1–Q4, backend list
0.2 2026-11-24 §5a a meeting is a meeting: no Video / Audio choice, everyone switches their own camera and mic, kind ignored for meetings; §7.2a the create form drawing
0.3 2026-11-24 §5b optional banner (coverMediaId, like the live banner; where it shows; plain card without one); form updated
0.4 2026-11-24 §7.2a three ways to create (⚡ Start now, 🔗 Link for later = just a link, 📅 Schedule = the full form), Google Meet comparison, mode on create

Revision #2
Created 24 November 2026 20:51:15 by Admin Qbit
Updated 24 November 2026 21:02:08 by Admin Qbit