|
|
@ -100,15 +100,15 @@ class DefaultPushHandler @Inject constructor( |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
val clientSecret = pushData.clientSecret |
|
|
|
val clientSecret = pushData.clientSecret |
|
|
|
val userId = if (clientSecret == null) { |
|
|
|
// clientSecret should not be null. If this happens, restore default session |
|
|
|
// Should not happen. In this case, restore default session |
|
|
|
val userId = clientSecret |
|
|
|
null |
|
|
|
?.let { |
|
|
|
} else { |
|
|
|
// Get userId from client secret |
|
|
|
// Get userId from client secret |
|
|
|
pushClientSecret.getUserIdFromSecret(clientSecret) |
|
|
|
pushClientSecret.getUserIdFromSecret(clientSecret) |
|
|
|
} |
|
|
|
} ?: run { |
|
|
|
?: run { |
|
|
|
matrixAuthenticationService.getLatestSessionId() |
|
|
|
matrixAuthenticationService.getLatestSessionId() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (userId == null) { |
|
|
|
if (userId == null) { |
|
|
|
Timber.w("Unable to get a session") |
|
|
|
Timber.w("Unable to get a session") |
|
|
|