Flesh out channel member management

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Max Brunsfeld 2023-08-04 14:12:08 -07:00
parent a2486de045
commit 87b2d599c1
13 changed files with 728 additions and 196 deletions

View file

@ -140,6 +140,7 @@ message Envelope {
RemoveChannel remove_channel = 127;
GetChannelMembers get_channel_members = 128;
GetChannelMembersResponse get_channel_members_response = 129;
SetChannelMemberAdmin set_channel_member_admin = 130;
}
}
@ -898,7 +899,8 @@ message GetChannelMembersResponse {
message ChannelMember {
uint64 user_id = 1;
Kind kind = 2;
bool admin = 2;
Kind kind = 3;
enum Kind {
Member = 0;
@ -927,6 +929,12 @@ message RemoveChannelMember {
uint64 user_id = 2;
}
message SetChannelMemberAdmin {
uint64 channel_id = 1;
uint64 user_id = 2;
bool admin = 3;
}
message RespondToChannelInvite {
uint64 channel_id = 1;
bool accept = 2;

View file

@ -217,6 +217,7 @@ messages!(
(JoinChannel, Foreground),
(RoomUpdated, Foreground),
(SaveBuffer, Foreground),
(SetChannelMemberAdmin, Foreground),
(SearchProject, Background),
(SearchProjectResponse, Background),
(ShareProject, Foreground),
@ -298,6 +299,7 @@ request_messages!(
(RemoveContact, Ack),
(RespondToContactRequest, Ack),
(RespondToChannelInvite, Ack),
(SetChannelMemberAdmin, Ack),
(GetChannelMembers, GetChannelMembersResponse),
(JoinChannel, JoinRoomResponse),
(RemoveChannel, Ack),