From 33f58f670ad60e6832fc40dab7ca94dca59bdd2e Mon Sep 17 00:00:00 2001 From: Kamal Bramwell <kamal@elixxir.io> Date: Thu, 27 Oct 2022 15:15:47 -0400 Subject: [PATCH] Implemented GroupId --- .../io/elixxir/xxclient/groupchat/GroupChat.kt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/xxclient/src/main/java/io/elixxir/xxclient/groupchat/GroupChat.kt b/xxclient/src/main/java/io/elixxir/xxclient/groupchat/GroupChat.kt index 814ceb2..ed649d1 100644 --- a/xxclient/src/main/java/io/elixxir/xxclient/groupchat/GroupChat.kt +++ b/xxclient/src/main/java/io/elixxir/xxclient/groupchat/GroupChat.kt @@ -7,17 +7,18 @@ import io.elixxir.xxclient.models.BindingsModel.Companion.decode import io.elixxir.xxclient.models.BindingsModel.Companion.decodeArray import io.elixxir.xxclient.models.GroupReport import io.elixxir.xxclient.models.GroupSendReport +import io.elixxir.xxclient.utils.GroupId interface GroupChat { val numGroups: Long - fun getGroup(groupId: ByteArray): Group - fun getGroups(): List<Group> + fun getGroup(groupId: GroupId): Group + fun getGroups(): List<GroupId> fun makeGroup(membership: ByteArray, message: ByteArray, name: ByteArray): GroupReport? - fun joinGroup(trackedGroupId: ByteArray) - fun leaveGroup(groupId: ByteArray) - fun resendRequest(groupId: ByteArray): GroupReport? - fun send(groupId: ByteArray, message: ByteArray, tag: String?): GroupSendReport? + fun joinGroup(trackedGroupId: GroupId) + fun leaveGroup(groupId: GroupId) + fun resendRequest(groupId: GroupId): GroupReport? + fun send(groupId: GroupId, message: ByteArray, tag: String?): GroupSendReport? } open class GroupChatAdapter( @@ -32,7 +33,7 @@ open class GroupChatAdapter( ) } - override fun getGroups(): List<Group> { + override fun getGroups(): List<GroupId> { return decodeArray(group.groups) } -- GitLab