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

Can cancel a group membership invitation

This commit is contained in:
2020-05-02 13:59:40 +02:00
parent f179e7e1d5
commit 1227ef283c
3 changed files with 131 additions and 31 deletions

View File

@ -268,6 +268,15 @@ class GroupsHelper {
.map((f) => _apiToGroupMembership(f))
.toList());
/// Cancel a group membership invitation
///
/// Throws an exception in case of failure
static Future<void> cancelInvitation(int groupID, int userID) async =>
await APIRequest.withLogin("groups/cancel_invitation")
.addInt("groupID", groupID)
.addInt("userID", userID)
.execWithThrow();
/// Turn an API entry into a group object
Group _getGroupFromAPI(Map<String, dynamic> map) {
return Group(