mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Can create a group
This commit is contained in:
@ -126,6 +126,17 @@ class GroupsHelper {
|
||||
.map((f) => cast<int>(f))
|
||||
.toSet();
|
||||
|
||||
/// Create a new group
|
||||
///
|
||||
/// Throws in case of failure
|
||||
static Future<int> create(String name) async {
|
||||
final result = await APIRequest.withLogin("groups/create")
|
||||
.addString("name", name)
|
||||
.execWithThrow();
|
||||
|
||||
return result.getObject()["id"];
|
||||
}
|
||||
|
||||
/// Perform a simple membership request
|
||||
Future<bool> _simpleMembershipRequest(int groupID, String uri,
|
||||
{Map<String, String> args}) async =>
|
||||
|
Reference in New Issue
Block a user