From d8acaa110767db8291bbd89ba7e608cac8d1fbfb Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Fri, 30 Aug 2024 12:46:37 +0100 Subject: [PATCH] chore: strip information from fcm notification for testing --- crates/core/database/src/tasks/web_push.rs | 6 ++---- scripts/publish-debug-image.sh | 11 +++++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/crates/core/database/src/tasks/web_push.rs b/crates/core/database/src/tasks/web_push.rs index d81250f0..683de189 100644 --- a/crates/core/database/src/tasks/web_push.rs +++ b/crates/core/database/src/tasks/web_push.rs @@ -101,9 +101,9 @@ pub async fn worker(db: Database) { image, body, tag: _, - timestamp, + timestamp: _, url: _, - message, + message: _, } = &task.payload; let message = fcm_v1::message::Message { @@ -123,8 +123,6 @@ pub async fn worker(db: Database) { }, ), ("body".to_owned(), serde_json::Value::String(body.clone())), - ("timestamp".to_owned(), json!(timestamp)), - ("message".to_owned(), json!(&message)), ])), ..Default::default() }; diff --git a/scripts/publish-debug-image.sh b/scripts/publish-debug-image.sh index 6fd3622c..5c748c90 100755 --- a/scripts/publish-debug-image.sh +++ b/scripts/publish-debug-image.sh @@ -1,14 +1,17 @@ -#!/bin/bash +#!/usr/bin/env bash # Check if an argument was provided -if [ "$#" -eq 0 ]; then +if [ $# -eq 0 ]; then echo "No arguments provided" - echo "Usage: scripts/build-current-arch.sh 20230826-1" + echo "Usage: scripts/publish-debug-image.sh 20230826-1 true" + echo "" + echo "Last argument specifies whether we should have a debug build as opposed to release build." exit 1 fi +DEBUG=$2 echo "[profile.release]" >> Cargo.toml -echo "debug = true" >> Cargo.toml +echo "debug = $2" >> Cargo.toml TAG=$1-debug echo "Building images, will tag for ghcr.io with $TAG!"