1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +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")

View File

@ -64,6 +64,8 @@ class ServerConfigurationHelper {
conversationsPolicy["max_message_image_height"],
maxThumbnailWidth: conversationsPolicy["max_thumbnail_width"],
maxThumbnailHeight: conversationsPolicy["max_thumbnail_height"],
maxLogoWidth: conversationsPolicy["max_logo_width"],
maxLogoHeight: conversationsPolicy["max_logo_height"],
));
}