Cockatrice/libcockatrice_protocol/libcockatrice/protocol/pb/serverinfo_room_channel.proto
BruebachL be38e8d429
[Protocol] Add room chat channel extensions and catalog payload (#7475)
* [Protocol] Add room chat channel extensions and catalog payload

* [Protocol] Add per-channel write level and banner to room channel catalog

Adds two optional fields to ServerInfo_RoomChannel:

- write_access_level: minimum privilege level required to send to the
  channel. When unset, writing requires the same level as reading
  (access_level), preserving the previous single-level behavior. This
  allows read-mostly channels such as a developer news feed: readable
  by everyone, writable only by developers.
- banner_message: static notice shown at the top of the channel,
  analogous to the room join message on Main. Empty means none.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-10-16 22:46:37 +02:00

23 lines
1.1 KiB
Protocol Buffer

syntax = "proto2";
message ServerInfo_RoomChannel {
enum AccessLevel {
// Minimum privilege level, evaluated against the privilege ladder
// Public < Registered < Judge < Moderator < Admin < Developer.
Public = 0;
Registered = 1;
Judge = 2;
Moderator = 3;
Admin = 4;
Developer = 5;
}
optional string id = 1; // stable ASCII id, e.g. "deck-discussion"
optional string display_name = 2; // server-provided, localizable only server-side
optional AccessLevel access_level = 3 [default = Public]; // minimum privilege level required to read the channel
// Minimum privilege level required to write to the channel. When unset, writing requires the same level as
// reading. This allows read-mostly channels such as a developer news feed: readable by everyone, writable
// only by developers.
optional AccessLevel write_access_level = 4;
// Static banner shown at the top of the channel, analogous to the room join message on Main. Empty = none.
optional string banner_message = 5;
}