mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-03 19:54:12 +00:00 
			
		
		
		
	Can delete a conversation from the list of conversations
This commit is contained in:
		@@ -51,7 +51,7 @@ class ConversationsHelper {
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    // Update all conversation settings, if possible
 | 
			
		||||
    if(settings.isOwner) {
 | 
			
		||||
    if (settings.isOwner) {
 | 
			
		||||
      request.addString("name", settings.hasName ? settings.name : "false");
 | 
			
		||||
      request.addString("members", settings.members.join(","));
 | 
			
		||||
    }
 | 
			
		||||
@@ -61,6 +61,19 @@ class ConversationsHelper {
 | 
			
		||||
    return response.code == 200;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /// Delete a conversation specified by its [id]
 | 
			
		||||
  Future<bool> deleteConversation(int id) async {
 | 
			
		||||
    final response = await APIRequest(
 | 
			
		||||
      uri: "conversations/delete",
 | 
			
		||||
      needLogin: true,
 | 
			
		||||
      args: {
 | 
			
		||||
        "conversationID": id.toString(),
 | 
			
		||||
      },
 | 
			
		||||
    ).exec();
 | 
			
		||||
 | 
			
		||||
    return response.code == 200;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /// Download the list of conversations from the server
 | 
			
		||||
  Future<ConversationsList> downloadList() async {
 | 
			
		||||
    final response =
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user