mirror of
https://github.com/oxen-io/session-android.git
synced 2023-12-14 02:53:01 +01:00
fix send text message to closed group
This commit is contained in:
parent
bb7334515c
commit
4a9ac91e5f
1 changed files with 3 additions and 2 deletions
|
@ -3,6 +3,7 @@ package org.session.libsession.messaging.messages
|
||||||
import org.session.libsession.messaging.MessagingConfiguration
|
import org.session.libsession.messaging.MessagingConfiguration
|
||||||
import org.session.libsession.messaging.threads.Address
|
import org.session.libsession.messaging.threads.Address
|
||||||
import org.session.libsession.utilities.GroupUtil
|
import org.session.libsession.utilities.GroupUtil
|
||||||
|
import org.session.libsignal.service.loki.utilities.toHexString
|
||||||
|
|
||||||
sealed class Destination {
|
sealed class Destination {
|
||||||
|
|
||||||
|
@ -15,8 +16,8 @@ sealed class Destination {
|
||||||
if (address.isContact) {
|
if (address.isContact) {
|
||||||
return Contact(address.contactIdentifier())
|
return Contact(address.contactIdentifier())
|
||||||
} else if (address.isClosedGroup) {
|
} else if (address.isClosedGroup) {
|
||||||
val groupID = address.contactIdentifier()
|
val groupID = address.toGroupString()
|
||||||
val groupPublicKey = GroupUtil.getDecodedGroupID(groupID)
|
val groupPublicKey = GroupUtil.doubleDecodeGroupID(groupID).toHexString()
|
||||||
return ClosedGroup(groupPublicKey)
|
return ClosedGroup(groupPublicKey)
|
||||||
} else if (address.isOpenGroup) {
|
} else if (address.isOpenGroup) {
|
||||||
val threadID = MessagingConfiguration.shared.storage.getThreadID(address.contactIdentifier())!!
|
val threadID = MessagingConfiguration.shared.storage.getThreadID(address.contactIdentifier())!!
|
||||||
|
|
Loading…
Reference in a new issue