mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 02:25:19 +00:00
Fix legacy closed group messaging
This commit is contained in:
parent
39792ef7f9
commit
cc6c6dab3d
@ -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 }
|
||||
|
Loading…
Reference in New Issue
Block a user