From bd08a120cda0949769225f197fbd947245703018 Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Mon, 7 Apr 2025 17:19:44 +0200 Subject: [PATCH] Consider aes128gcm content encoding as an indicator for UnifiedPush Without this a UnifiedPush/Web Push message with encryption would be turned into an attachment. That in itself isn't pretty but can still work, but it requires attachments to be enabled in the first place. --- server/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/server.go b/server/server.go index ee2da76a..8e2f6992 100644 --- a/server/server.go +++ b/server/server.go @@ -1025,7 +1025,8 @@ func (s *Server) parsePublishParams(r *http.Request, m *message) (cache bool, fi } template = readBoolParam(r, false, "x-template", "template", "tpl") unifiedpush = readBoolParam(r, false, "x-unifiedpush", "unifiedpush", "up") // see GET too! - if unifiedpush { + contentEncoding := readParam(r, "content-encoding") + if unifiedpush || contentEncoding == "aes128gcm" { firebase = false unifiedpush = true }