feat: wiring together storage and configs for groups in a test way, experimenting with best structure that makes sense for group creation

This commit is contained in:
0x330a
2023-09-08 12:42:53 +10:00
parent 026f0056b9
commit de885b4b4a
6 changed files with 49 additions and 25 deletions

View File

@@ -155,7 +155,7 @@ interface StorageProtocol {
fun setExpirationTimer(address: String, duration: Int)
// Closed Groups
fun createNewGroup(groupName: String, groupDescription: String, members: List<SessionId>): Long?
fun createNewGroup(groupName: String, groupDescription: String, members: Set<SessionId>): Long?
fun getMembers(groupPublicKey: String): List<network.loki.messenger.libsession_util.util.GroupMember>
// Groups

View File

@@ -16,9 +16,9 @@ interface ConfigFactoryProtocol {
val convoVolatile: ConversationVolatileConfig?
val userGroups: UserGroupsConfig?
fun groupInfoConfig(groupSessionId: SessionId): GroupInfoConfig?
fun groupKeysConfig(groupSessionId: SessionId): GroupKeysConfig?
fun groupMemberConfig(groupSessionId: SessionId): GroupMembersConfig?
fun getOrConstructGroupInfoConfig(groupSessionId: SessionId): GroupInfoConfig?
fun getOrConstructGroupMemberConfig(groupSessionId: SessionId): GroupMembersConfig?
fun getGroupKeysConfig(groupSessionId: SessionId): GroupKeysConfig?
fun getUserConfigs(): List<ConfigBase>
fun persist(forConfigObject: ConfigBase, timestamp: Long)