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.
This commit is contained in:
Volker Krause 2025-04-07 17:19:44 +02:00
parent 630f2957de
commit bd08a120cd

View file

@ -1025,7 +1025,8 @@ func (s *Server) parsePublishParams(r *http.Request, m *message) (cache bool, fi
} }
template = readBoolParam(r, false, "x-template", "template", "tpl") template = readBoolParam(r, false, "x-template", "template", "tpl")
unifiedpush = readBoolParam(r, false, "x-unifiedpush", "unifiedpush", "up") // see GET too! unifiedpush = readBoolParam(r, false, "x-unifiedpush", "unifiedpush", "up") // see GET too!
if unifiedpush { contentEncoding := readParam(r, "content-encoding")
if unifiedpush || contentEncoding == "aes128gcm" {
firebase = false firebase = false
unifiedpush = true unifiedpush = true
} }