Skip to content

Commit

Permalink
🐛 Fix preKeyBundle api
Browse files Browse the repository at this point in the history
  • Loading branch information
guiyanakuang committed Feb 9, 2024
1 parent 2b7f5c5 commit a08faa3
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ fun Routing.syncRouting() {
get("/sync/preKeyBundle") {
getAppInstanceId(call).let { appInstanceId ->

val signalProtocolAddress = SignalProtocolAddress(appInstanceId, 1)

signalProtocolStore.getIdentity(signalProtocolAddress)?.let {
failResponse(call, StandardErrorCode.SIGNAL_UNTRUSTED_IDENTITY.toErrorCode(), "not trust $appInstanceId")
return@get
}

val identityKeyPair = signalProtocolStore.identityKeyPair
val registrationId = signalProtocolStore.localRegistrationId
val deviceId = 1
Expand Down

0 comments on commit a08faa3

Please sign in to comment.