1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-05-29 09:55:35 +02:00

Add RFC 2047 encoding support for tags

This commit is contained in:
binwiederhier 2023-04-24 13:00:14 -04:00
parent 35eac5b9ad
commit 59a5077713
2 changed files with 6 additions and 0 deletions

View file

@ -2474,12 +2474,15 @@ func TestServer_PublishWithUTF8MimeHeader(t *testing.T) {
"X-Filename": "some attachment.txt",
"X-Message": "=?UTF-8?B?8J+HqfCfh6o=?=",
"X-Title": "=?UTF-8?B?bnRmeSDlvojmo5I=?=, no really I mean it! =?UTF-8?Q?This is q=C3=BC=C3=B6ted-print=C3=A4ble.?=",
"X-Tags": "=?UTF-8?B?8J+HqfCfh6o=?=, =?UTF-8?B?bnRmeSDlvojmo5I=?=",
})
require.Equal(t, 200, response.Code)
m := toMessage(t, response.Body.String())
require.Equal(t, "🇩🇪", m.Message)
require.Equal(t, "ntfy 很棒, no really I mean it! This is qüöted-printäble.", m.Title)
require.Equal(t, "some attachment.txt", m.Attachment.Name)
require.Equal(t, "🇩🇪", m.Tags[0])
require.Equal(t, "ntfy 很棒", m.Tags[1])
}
func newTestConfig(t *testing.T) *Config {