From 3e68bdc2f8fbda6ef245874230bc0e5a7b8c0d42 Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Tue, 10 Jan 2023 13:02:25 +1100 Subject: [PATCH] Fixed an issue introduced by the last commit with OpenGroup initialisation --- .../java/org/thoughtcrime/securesms/groups/OpenGroupManager.kt | 2 +- .../org/session/libsession/messaging/open_groups/OpenGroup.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/groups/OpenGroupManager.kt b/app/src/main/java/org/thoughtcrime/securesms/groups/OpenGroupManager.kt index 09c6f19dab..bdf7c1da0f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/groups/OpenGroupManager.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/groups/OpenGroupManager.kt @@ -81,7 +81,7 @@ object OpenGroupManager { if (threadID < 0) { threadID = GroupManager.createOpenGroup(openGroupID, context, null, info.name).threadId } - val openGroup = OpenGroup(server, room, publicKey, info.name, info.imageId, info.infoUpdates) + val openGroup = OpenGroup(server = server, room = room, publicKey = publicKey, name = info.name, imageId = info.imageId, infoUpdates = info.infoUpdates) threadDB.setOpenGroupChat(openGroup, threadID) return info } diff --git a/libsession/src/main/java/org/session/libsession/messaging/open_groups/OpenGroup.kt b/libsession/src/main/java/org/session/libsession/messaging/open_groups/OpenGroup.kt index b2bdd6384a..b7cce77680 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/open_groups/OpenGroup.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/open_groups/OpenGroup.kt @@ -38,7 +38,7 @@ data class OpenGroup( val imageId = json.get("imageId")?.asText() val infoUpdates = json.get("infoUpdates")?.asText()?.toIntOrNull() ?: 0 val capabilities = json.get("capabilities")?.asText()?.split(",") ?: emptyList() - OpenGroup(server, room, displayName, publicKey, imageId, infoUpdates) + OpenGroup(server = server, room = room, name = displayName, publicKey = publicKey, imageId = imageId, infoUpdates = infoUpdates) } catch (e: Exception) { Log.w("Loki", "Couldn't parse open group from JSON: $jsonAsString.", e); null