mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-07 03:04:32 +00:00
Fixed an issue introduced by the last commit with OpenGroup initialisation
This commit is contained in:
parent
5afd647686
commit
3e68bdc2f8
@ -81,7 +81,7 @@ object OpenGroupManager {
|
|||||||
if (threadID < 0) {
|
if (threadID < 0) {
|
||||||
threadID = GroupManager.createOpenGroup(openGroupID, context, null, info.name).threadId
|
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)
|
threadDB.setOpenGroupChat(openGroup, threadID)
|
||||||
return info
|
return info
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ data class OpenGroup(
|
|||||||
val imageId = json.get("imageId")?.asText()
|
val imageId = json.get("imageId")?.asText()
|
||||||
val infoUpdates = json.get("infoUpdates")?.asText()?.toIntOrNull() ?: 0
|
val infoUpdates = json.get("infoUpdates")?.asText()?.toIntOrNull() ?: 0
|
||||||
val capabilities = json.get("capabilities")?.asText()?.split(",") ?: emptyList()
|
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) {
|
} catch (e: Exception) {
|
||||||
Log.w("Loki", "Couldn't parse open group from JSON: $jsonAsString.", e);
|
Log.w("Loki", "Couldn't parse open group from JSON: $jsonAsString.", e);
|
||||||
null
|
null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user