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:
@ -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")
|
||||
|
@ -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"],
|
||||
));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user