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