When you leave from a group, a message is sent to the other member clients of the group to notify that you have left the group.
The example code below shows how to leave from a group, the handling of the server response from leaving and the event listener callback for other member clients leaving the group you have joined.
// This is the group ID that you are trying to joinstring groupID ="xxxxxx";// This is the message to be sent to other group members when you successfully join the groupconst vector<uint8_t> message = groupJoinMessageData;// This is the event listener callback for the server response when leaving a groupREG_EVENT(group->GetLeaveEvent(), [this](void*,constDiarkisGroupEventArgs& e){this->OnLeave(e);});// This event is raised when a remote member client leaves the group you have joinedREG_EVENT(group->GetMemberLeaveEvent(), [this](void*,constDiarkisGroupEventArgs& e){this->OnMemberLeave(e);});group->:Leave(groupID, message);