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:
@ -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(
|
||||
|
Reference in New Issue
Block a user