1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-07-03 15:13:29 +00:00

Can change conversation image

This commit is contained in:
2021-03-13 11:33:25 +01:00
parent cbbda7237b
commit 642f5e11fc
5 changed files with 71 additions and 2 deletions

View File

@ -100,6 +100,15 @@ class ConversationsHelper {
.removeElement((t) => t.id == settings.convID);
}
/// Set a new conversation logo
///
/// Throws in case of failure
static Future<void> changeImage(int convID, BytesFile file) async =>
await APIRequest.withLogin("conversations/change_image")
.addInt("convID", convID)
.addBytesFile("file", file)
.execWithFilesAndThrow();
/// Delete a conversation specified by its [id]
Future<void> deleteConversation(int id) async =>
await APIRequest.withLogin("conversations/delete")