fix: exclude lgc without membership > 1 and inactive explicitly

This commit is contained in:
0x330a 2023-07-11 16:52:06 +10:00
parent bd8368f2fa
commit 042e2bf509
1 changed files with 3 additions and 1 deletions

View File

@ -240,7 +240,9 @@ object ConfigurationMessageUtilities {
GroupInfo.CommunityGroupInfo(baseInfo, if (isPinned) 1 else 0)
}
val allLgc = storage.getAllGroups(includeInactive = false).filter { it.isClosedGroup }.mapNotNull { group ->
val allLgc = storage.getAllGroups(includeInactive = false).filter {
it.isClosedGroup && it.isActive && it.members.size > 1
}.mapNotNull { group ->
val groupAddress = Address.fromSerialized(group.encodedId)
val groupPublicKey = GroupUtil.doubleDecodeGroupID(groupAddress.serialize()).toHexString()
val recipient = storage.getRecipientSettings(groupAddress) ?: return@mapNotNull null