mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-15 21:20:43 +00:00
Fix legacy closed group messaging
This commit is contained in:
@@ -411,8 +411,13 @@ object ClosedGroupsProtocol {
|
||||
if (GroupUtil.isOpenGroup(groupID)) {
|
||||
return listOf( Address.fromSerialized(groupID) )
|
||||
} else {
|
||||
val groupPublicKey = doubleDecodeGroupID(groupID).toHexString()
|
||||
if (DatabaseFactory.getSSKDatabase(context).isSSKBasedClosedGroup(groupPublicKey)) {
|
||||
var groupPublicKey: String? = null
|
||||
try {
|
||||
groupPublicKey = doubleDecodeGroupID(groupID).toHexString()
|
||||
} catch (exception: Exception) {
|
||||
// Do nothing
|
||||
}
|
||||
if (groupPublicKey != null && DatabaseFactory.getSSKDatabase(context).isSSKBasedClosedGroup(groupPublicKey)) {
|
||||
return listOf( Address.fromSerialized(groupPublicKey) )
|
||||
} else {
|
||||
return DatabaseFactory.getGroupDatabase(context).getGroupMembers(groupID, false).map { it.address }
|
||||
|
Reference in New Issue
Block a user