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

Can respond to a group membership request

This commit is contained in:
2020-05-02 15:57:49 +02:00
parent 3c7795837c
commit 2edaedc5f3
2 changed files with 41 additions and 1 deletions

View File

@ -286,6 +286,17 @@ class GroupsHelper {
.addInt("userID", userID)
.execWithThrow();
/// Respond to a group membership request
///
/// Throws an exception in case of failure
static Future<void> respondRequest(
int groupID, int userID, bool accept) async =>
await APIRequest.withLogin("groups/respond_request")
.addInt("groupID", groupID)
.addInt("userID", userID)
.addBool("accept", accept)
.execWithThrow();
/// Turn an API entry into a group object
Group _getGroupFromAPI(Map<String, dynamic> map) {
return Group(