mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2024-09-29 16:30:49 +00:00
Fix token sanitization when using gcompatup
This commit is contained in:
parent
b6bb214532
commit
3d61343905
@ -84,7 +84,7 @@ class PushMessageReceiver : MessagingReceiver() {
|
|||||||
endpoint: String,
|
endpoint: String,
|
||||||
instance: String,
|
instance: String,
|
||||||
) {
|
) {
|
||||||
val sanitizedEndpoint = endpoint.dropLast(5)
|
val sanitizedEndpoint = if (endpoint.endsWith("?up=1")) endpoint.dropLast(5) else endpoint
|
||||||
if (sanitizedEndpoint != pushHandler.getSavedEndpoint()) {
|
if (sanitizedEndpoint != pushHandler.getSavedEndpoint()) {
|
||||||
Log.d(TAG, "New endpoint provided:- $endpoint for Instance: $instance ${pushHandler.getSavedEndpoint()} $sanitizedEndpoint")
|
Log.d(TAG, "New endpoint provided:- $endpoint for Instance: $instance ${pushHandler.getSavedEndpoint()} $sanitizedEndpoint")
|
||||||
pushHandler.setEndpoint(sanitizedEndpoint)
|
pushHandler.setEndpoint(sanitizedEndpoint)
|
||||||
|
Loading…
Reference in New Issue
Block a user