diff options
| author | Mark Felder <feld@feld.me> | 2023-12-19 10:18:29 -0500 |
|---|---|---|
| committer | Mark Felder <feld@feld.me> | 2023-12-19 10:56:55 -0500 |
| commit | e2066994b1e64481e0e74350688d91c71d03e230 (patch) | |
| tree | 93094e7c900f0b316b9ac3a71223b388844d1845 /lib | |
| parent | 8893a044b3af5be607512a6b19747dc447d02262 (diff) | |
| download | pleroma-e2066994b1e64481e0e74350688d91c71d03e230.tar.gz pleroma-e2066994b1e64481e0e74350688d91c71d03e230.zip | |
Fix Web Push notification delivery
Finch does not automatically append header content-type: octet-stream for binary payloads.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/pleroma/http/web_push.ex | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pleroma/http/web_push.ex b/lib/pleroma/http/web_push.ex index ca399b6c8..888079c1e 100644 --- a/lib/pleroma/http/web_push.ex +++ b/lib/pleroma/http/web_push.ex @@ -6,7 +6,11 @@ defmodule Pleroma.HTTP.WebPush do @moduledoc false def post(url, payload, headers, options \\ []) do - list_headers = Map.to_list(headers) + list_headers = + headers + |> Map.to_list() + |> Kernel.++([{"content-type", "octet-stream"}]) + Pleroma.HTTP.post(url, payload, list_headers, options) end end |
