Cleanup session/
This commit is contained in:
@@ -148,7 +148,6 @@ void SessionModel::apply_channel_event(const voicecat::v1::ChannelEvent& ev) {
|
||||
|
||||
} else if (ev.kind() == Kind::DELETED) {
|
||||
// deleted_id, not channel().id() — the proto leaves `channel` unset for deletes
|
||||
// (docs/protocol.md, core/proto/voicecat.proto's ChannelEvent).
|
||||
uint32_t cid = ev.deleted_id();
|
||||
channels_.erase(std::remove_if(channels_.begin(), channels_.end(),
|
||||
[cid](const Channel& x) { return x.id == cid; }),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* session/session.h — client-side mirror of the server's channel/user state.
|
||||
* session/session.h: client-side mirror of the server's channel/user state.
|
||||
*
|
||||
* Populated from ServerStateSnapshot (full snapshot) and incremental UserEvent /
|
||||
* ChannelEvent messages. Not thread-safe — always called from io_thread_.
|
||||
@@ -24,7 +24,7 @@ struct Channel {
|
||||
bool password_protected{false};
|
||||
uint32_t max_users{0};
|
||||
uint32_t sort_order{0};
|
||||
// Authoritative channel AudioConfig (docs/voice.md §3) — mirrors
|
||||
// Authoritative channel AudioConfig mirrors
|
||||
// voicecat::v1::AudioConfig field-for-field, same flat shape as Stream below. Populated
|
||||
// from ServerStateSnapshot / ChannelEvent so the channel-edit dialog can read back the
|
||||
// current config (the vc_channel read struct now carries these too).
|
||||
@@ -45,7 +45,7 @@ struct Stream {
|
||||
uint32_t ssrc{0};
|
||||
int kind{0};
|
||||
std::string label;
|
||||
// Full effective AudioConfig (docs/protocol.md §5), as broadcast by the server in
|
||||
// Full effective AudioConfig as broadcast by the server in
|
||||
// StreamInfo.audio — mirrors voicecat::v1::AudioConfig field-for-field so per-channel
|
||||
// tuning (mono/stereo, bitrate, FEC/DTX, application) is observable client-side, not just
|
||||
// sample_rate/frame_ms.
|
||||
|
||||
Reference in New Issue
Block a user