add removal of presence
All checks were successful
Build and Test / mario-tennis (push) Successful in 9m35s
Build and Test / wii-sports-club (push) Successful in 9m50s
Build and Test / terraria (push) Successful in 10m56s
Build and Test / splatoon-testfire (push) Successful in 12m4s
Build and Test / wii-u-chat (push) Successful in 12m11s
Build and Test / splatoon (push) Successful in 12m11s
Build and Test / fast-racing-neo (push) Successful in 12m31s
Build and Test / minecraft-wiiu (push) Successful in 13m21s
Build and Test / puyopuyo (push) Successful in 13m26s
Build and Test / sonic-transformed (push) Successful in 13m27s
Build and Test / friends (push) Successful in 13m28s
Build and Test / super-mario-maker (push) Successful in 13m38s
All checks were successful
Build and Test / mario-tennis (push) Successful in 9m35s
Build and Test / wii-sports-club (push) Successful in 9m50s
Build and Test / terraria (push) Successful in 10m56s
Build and Test / splatoon-testfire (push) Successful in 12m4s
Build and Test / wii-u-chat (push) Successful in 12m11s
Build and Test / splatoon (push) Successful in 12m11s
Build and Test / fast-racing-neo (push) Successful in 12m31s
Build and Test / minecraft-wiiu (push) Successful in 13m21s
Build and Test / puyopuyo (push) Successful in 13m26s
Build and Test / sonic-transformed (push) Successful in 13m27s
Build and Test / friends (push) Successful in 13m28s
Build and Test / super-mario-maker (push) Successful in 13m38s
This commit is contained in:
parent
eff58c1f49
commit
62e867af2f
1 changed files with 9 additions and 1 deletions
|
|
@ -1327,7 +1327,7 @@ impl FriendsWiiU for FriendsUser {
|
|||
tokio::task::spawn_blocking(move || {
|
||||
let presence_server_url = std::env::var("RNEX_PRESENCE_API_URL").unwrap_or_else(|_| "http://localhost:3000".to_string());
|
||||
let presence_server_secret = std::env::var("RNEX_PRESENCE_API_SECRET").unwrap_or_else(|_| "no-secret-defined".to_string());
|
||||
let _ = ureq::post(presence_server_url)
|
||||
let _ = ureq::post(&format!("{}/api/v1/presence", presence_server_url))
|
||||
.header("Authorization", &format!("Bearer {}", presence_server_secret))
|
||||
.send_json(serde_json::json!({
|
||||
"pid": pid_val,
|
||||
|
|
@ -1596,6 +1596,14 @@ impl Drop for FriendsUser {
|
|||
let pid = self.pid;
|
||||
let fm = self.fm.clone();
|
||||
tokio::spawn(async move {
|
||||
tokio::task::spawn_blocking(move || {
|
||||
let presence_server_url = std::env::var("RNEX_PRESENCE_API_URL").unwrap_or_else(|_| "http://localhost:3000".to_string());
|
||||
let presence_server_secret = std::env::var("RNEX_PRESENCE_API_SECRET").unwrap_or_else(|_| "no-secret-defined".to_string());
|
||||
let _ = ureq::delete(&format!("{}/api/v1/presence/{}", presence_server_url, pid))
|
||||
.header("Authorization", &format!("Bearer {}", presence_server_secret))
|
||||
.call();
|
||||
});
|
||||
|
||||
for user in users {
|
||||
let Some(user) = user.1.upgrade() else {
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue