mirror of https://github.com/oxen-io/session-ios
commit
8cbad6c69c
@ -1,4 +1,10 @@
|
||||
|
||||
public func getUserHexEncodedPublicKey() -> String {
|
||||
return OWSIdentityManager.shared().identityKeyPair()!.hexEncodedPublicKey
|
||||
// In some cases like deleting an account
|
||||
// the backgroud fetch was not stopped
|
||||
// so the identityKeyPair can be nil
|
||||
if let keyPair = OWSIdentityManager.shared().identityKeyPair() {
|
||||
return keyPair.hexEncodedPublicKey
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
Loading…
Reference in New Issue