M5: Windows client moderation UI; add C ABI getters for account list, user mute/deafen, channel topic
This commit is contained in:
@@ -58,6 +58,7 @@ void SessionModel::apply_snapshot(const voicecat::v1::ServerStateSnapshot& snap)
|
||||
ch.id = pb.id();
|
||||
ch.parent_id = pb.parent_id();
|
||||
ch.name = pb.name();
|
||||
ch.topic = pb.topic();
|
||||
ch.password_protected = pb.password_protected();
|
||||
ch.max_users = pb.max_users();
|
||||
channels_.push_back(std::move(ch));
|
||||
@@ -70,6 +71,8 @@ void SessionModel::apply_snapshot(const voicecat::v1::ServerStateSnapshot& snap)
|
||||
u.nickname = pb.nickname();
|
||||
u.is_guest = pb.is_guest();
|
||||
u.channel_id = pb.channel_id();
|
||||
u.self_mic_muted = pb.self_mic_muted();
|
||||
u.self_deafened = pb.self_deafened();
|
||||
u.server_muted = pb.server_muted();
|
||||
u.server_deafened = pb.server_deafened();
|
||||
u.streams = copy_streams(pb.streams());
|
||||
@@ -87,6 +90,8 @@ void SessionModel::apply_user_event(const voicecat::v1::UserEvent& ev) {
|
||||
u.nickname = pb.nickname();
|
||||
u.is_guest = pb.is_guest();
|
||||
u.channel_id = pb.channel_id();
|
||||
u.self_mic_muted = pb.self_mic_muted();
|
||||
u.self_deafened = pb.self_deafened();
|
||||
u.server_muted = pb.server_muted();
|
||||
u.server_deafened = pb.server_deafened();
|
||||
u.streams = copy_streams(pb.streams());
|
||||
@@ -113,6 +118,7 @@ void SessionModel::apply_channel_event(const voicecat::v1::ChannelEvent& ev) {
|
||||
ch.id = pb.id();
|
||||
ch.parent_id = pb.parent_id();
|
||||
ch.name = pb.name();
|
||||
ch.topic = pb.topic();
|
||||
ch.password_protected = pb.password_protected();
|
||||
ch.max_users = pb.max_users();
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ struct Channel {
|
||||
uint32_t id{0};
|
||||
uint32_t parent_id{0};
|
||||
std::string name;
|
||||
std::string topic;
|
||||
bool password_protected{false};
|
||||
uint32_t max_users{0};
|
||||
};
|
||||
@@ -51,6 +52,8 @@ struct User {
|
||||
std::string nickname;
|
||||
bool is_guest{true};
|
||||
uint32_t channel_id{0};
|
||||
bool self_mic_muted{false};
|
||||
bool self_deafened{false};
|
||||
bool server_muted{false};
|
||||
bool server_deafened{false};
|
||||
std::vector<Stream> streams;
|
||||
|
||||
Reference in New Issue
Block a user