core: protocol/commands to change member role (#1159)
* core: protocol/commands to change member role * change member roles * add test * correction Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com> * add member profile to group member role events * resend invitation when invited member role changes * test role change with invitation, fix * add delays to tests * add test delay Co-authored-by: JRoberts <8711996+jr-simplex@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
841afa1e80
commit
58f6b168e6
@@ -213,6 +213,8 @@ Currently members can have one of three roles - `owner`, `admin` and `member`. T
|
||||
|
||||
`x.grp.mem.info` this message is sent as part of member connection handshake - it includes group member profile.
|
||||
|
||||
`x.grp.mem.role` message is sent to update group member role - it is sent to all members by the member who updated the role of the member referenced in this message. This message MUST only be sent by members with `admin` or `owner` role. Receiving clients MUST ignore this message if it is received from member with role less than `admin`.
|
||||
|
||||
`x.grp.mem.del` message is sent to delete a member - it is sent to all members by the member who deletes the member referenced in this message. This message MUST only be sent by members with `admin` or `owner` role. Receiving clients MUST ignore this message if it is received from member with `member` role.
|
||||
|
||||
`x.grp.leave` message is sent to all members by the member leaving the group. If the only group `owner` leaves the group, it will not be possible to delete it with `x.grp.del` message - but all members can still leave the group with `x.grp.leave` message and then delete a local copy of the group.
|
||||
|
||||
@@ -129,6 +129,9 @@
|
||||
"directConnReq": {"ref": "connReqUri"}
|
||||
}
|
||||
},
|
||||
"groupMemberRole": {
|
||||
"enum": ["author", "member", "admin", "owner"]
|
||||
},
|
||||
"callInvitation": {
|
||||
"properties": {
|
||||
"callType": {"ref": "callType"}
|
||||
@@ -374,6 +377,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"x.grp.mem.role": {
|
||||
"properties": {
|
||||
"msgId": {"ref": "base64url"},
|
||||
"params": {
|
||||
"properties": {
|
||||
"memberId": {"ref": "base64url"},
|
||||
"role": {"ref": "groupMemberRole"}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x.grp.mem.del": {
|
||||
"properties": {
|
||||
"msgId": {"ref": "base64url"},
|
||||
|
||||
Reference in New Issue
Block a user