feat: host the BM chat context

When golem15.chat is active, Boot registers the context alias bm (id 1)
on its registry. Membership is the user group jz.bm.chat.group (default
studenci); CanOverseeChats is always false, so nobody reads other
people's DMs or edits their messages; the broadcast channel is
chat:context:1, never empty.

GET /_bm/api/v1/chat answers the caller's membership behind jwt.auth and
the per-user bucket jz.bm.chat (240 a minute). The chat config block
(group, moderator_group, max_upload_bytes, max_embeds) is added. jz.bm
still Requires only golem15.user; all chat wiring is gated by HasPlugin.
This commit is contained in:
2026-10-26 15:40:44 +01:00
parent 67806f49a7
commit 64601f6817
9 changed files with 482 additions and 5 deletions

View File

@@ -9,3 +9,18 @@ dashboard_limit: 5
# the calendar feed URL and the course links inside the feed. Empty means
# the scheme and Host of the request.
public_url: ""
# The student chat (golem15.chat, golem15.chatchannels). Membership is the
# user group whose code is chat.group; nobody is added to it automatically,
# members are assigned in the backend. Members of chat.moderator_group may
# delete other people's messages in channels. Env keys:
# SUMMER_JZ__BM__CHAT__GROUP, SUMMER_JZ__BM__CHAT__MODERATOR_GROUP,
# SUMMER_JZ__BM__CHAT__MAX_UPLOAD_BYTES, SUMMER_JZ__BM__CHAT__MAX_EMBEDS.
chat:
group: studenci
moderator_group: moderatorzy
# Total size of one message's attachments (60 MiB). It stays under nginx's
# client_max_body_size 64m so the multipart envelope still fits.
max_upload_bytes: 62914560
# Entity embeds (deadline, class, reading) per message.
max_embeds: 3