mirror of
https://github.com/oxen-io/session-android.git
synced 2025-03-27 07:02:14 +00:00
Add logs
This commit is contained in:
parent
e7b2e3a223
commit
968177c012
@ -179,6 +179,7 @@ object ClosedGroupsProtocol {
|
||||
|
||||
@JvmStatic
|
||||
public fun requestSenderKey(context: Context, groupPublicKey: String, senderPublicKey: String) {
|
||||
Log.d("Loki", "Requesting sender key for group public key: $groupPublicKey, sender public key: $senderPublicKey.")
|
||||
// Establish session if needed
|
||||
ApplicationContext.getInstance(context).sendSessionRequestIfNeeded(senderPublicKey)
|
||||
// Send the request
|
||||
@ -328,6 +329,7 @@ object ClosedGroupsProtocol {
|
||||
return
|
||||
}
|
||||
// Respond to the request
|
||||
Log.d("Loki", "Responding to sender key request from: $senderPublicKey.")
|
||||
ApplicationContext.getInstance(context).sendSessionRequestIfNeeded(senderPublicKey)
|
||||
val userRatchet = SharedSenderKeysImplementation.shared.generateRatchet(groupPublicKey, userPublicKey)
|
||||
val userSenderKey = ClosedGroupSenderKey(Hex.fromStringCondensed(userRatchet.chainKey), userRatchet.keyIndex, Hex.fromStringCondensed(userPublicKey))
|
||||
@ -363,6 +365,7 @@ object ClosedGroupsProtocol {
|
||||
return
|
||||
}
|
||||
// Store the sender key
|
||||
Log.d("Loki", "Received a sender key from: $senderPublicKey.")
|
||||
val ratchet = ClosedGroupRatchet(senderKey.chainKey.toHexString(), senderKey.keyIndex, listOf())
|
||||
sskDatabase.setClosedGroupRatchet(groupPublicKey, senderPublicKey, ratchet)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user