Skip to content

Commit

Permalink
Content available flag (#203)
Browse files Browse the repository at this point in the history
* added content available flag

* bumped version

* remove debug
  • Loading branch information
lassemand authored Sep 10, 2024
1 parent 99fc93d commit 9d4864e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
2 changes: 1 addition & 1 deletion notification-server/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion notification-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Concordium AG [email protected]"]
edition = "2021"
name = "notification-server"
version = "0.2.2"
version = "0.2.3"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
28 changes: 26 additions & 2 deletions notification-server/src/google_cloud.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,13 @@ where
};
payload["message"] = json!({
"token": device_token,
"data": entity_data
"data": entity_data,
"apns": {
"payload": {
"content-available": 1
}
}
});

let operation = || async {
let response = self
.client
Expand Down Expand Up @@ -338,6 +342,11 @@ mod tests {
"amount": "100",
"type": "ccd-tx",
"reference": "3d1c2f4fb9a0eb468bfe39e75c59897c1a375082a6440f4a5da77102182ba055",
},
"apns": {
"payload": {
"content-available": 1
}
}
}
});
Expand Down Expand Up @@ -400,6 +409,11 @@ mod tests {
"contract_address": "{\"index\":3,\"subindex\":0}",
"contract_name": "contract",
"reference": "6a6d250ecefb518253db4c0d7759b2f4ff2862217ed2c8343879a77e0c2c97a2",
},
"apns": {
"payload": {
"content-available": 1
}
}
}
});
Expand Down Expand Up @@ -467,6 +481,11 @@ mod tests {
"token_id": "ffffff",
"token_metadata": "{\"url\":\"https://example.com\",\"hash\":null}",
"reference": "494d7848e389d44a2c2fe81eeee6dc427ce33ab1d0c92cba23be321d495be110",
},
"apns": {
"payload": {
"content-available": 1
}
}
}
});
Expand Down Expand Up @@ -533,6 +552,11 @@ mod tests {
"token_id": "ffffff",
"token_metadata": "{\"url\":\"https://example.com\",\"hash\":\"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08\"}",
"reference": "8a3a09bffa6ead269f79be4192fcb7773cc4e10a2e90c0dec3eb9ca5200c06bc"
},
"apns": {
"payload": {
"content-available": 1
}
}
}
});
Expand Down

0 comments on commit 9d4864e

Please sign in to comment.