1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Can remove a member from a group

This commit is contained in:
2020-05-02 17:05:18 +02:00
parent 2edaedc5f3
commit eb66ea407b
2 changed files with 49 additions and 5 deletions

View File

@ -297,6 +297,15 @@ class GroupsHelper {
.addBool("accept", accept)
.execWithThrow();
/// Remove a member from a group
///
/// Throws an exception in case of failure
static Future<void> removeMemberFromGroup(int groupID, int userID) async =>
APIRequest.withLogin("groups/delete_member")
.addInt("groupID", groupID)
.addInt("userID", userID)
.execWithThrow();
/// Turn an API entry into a group object
Group _getGroupFromAPI(Map<String, dynamic> map) {
return Group(