#[non_exhaustive]pub enum GroupUpdateAction {
Create,
AddMembers {
added: Vec<ChatMember>,
},
RemoveMembers {
removed_ids: Vec<Id>,
},
UpdateRoles {
updated: Vec<ChatMember>,
},
UpdateMetadata,
Leave,
Close,
}Expand description
The action of a OutboundEvent::GroupUpdate
(draft-atwood-jmap-chat-federation-00 §Peer/groupUpdate).
One Chat/set update can report several actions. They come in this
order: UpdateMetadata, AddMembers, RemoveMembers, UpdateRoles,
then Leave or Close, so the owner’s departure is last.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Create
"create". draft-atwood-jmap-chat-00 §Creating a Chat: the server
“MUST send Peer/groupUpdate to each initial member”. Recipients:
the initial members.
AddMembers
"addMembers", with the added members as stored. §Chat/set
addMembers: “the server MUST send Peer/groupUpdate to all
current members”. Recipients: every member after the change.
Fields
added: Vec<ChatMember>addedMembers.
RemoveMembers
"removeMembers". §Chat/set removeMembers: “The server MUST
send Peer/groupUpdate to all remaining members and to the
removed members.” Recipients: both.
UpdateRoles
"updateRoles", with the members whose role changed, as stored.
§Chat/set updateMemberRoles: “The server MUST send
Peer/groupUpdate to all members.” Recipients: every member.
Fields
updated: Vec<ChatMember>updatedRoles (each member’s id and new role).
UpdateMetadata
"updateMetadata": name, description or avatarBlobId
changed. Recipients: every member.
Leave
"leave": the owner left. §Chat/set removeMembers: the server
“MUST notify the other members with a Peer/groupUpdate of action
"leave"”. Recipients: the remaining members.
Close
"close": the owner, the last admin, left while members remain,
which closed the group. The server “MUST notify the other members
with a Peer/groupUpdate of action "close" in place of
"leave"”. Recipients: the remaining members.