refactor(pushover): use both formats of content-type header

pull/3701/head
masesisaac 6 months ago
parent 4fc6b5c54a
commit 771d8983b1

@ -56,9 +56,13 @@ class PushoverAgent
responseType: 'arraybuffer',
});
const base64 = Buffer.from(response.data, 'binary').toString('base64');
const contentType = (
response.headers['Content-Type'] || response.headers['content-type']
)?.toString();
return {
attachment_base64: base64,
attachment_type: response.headers['content-type'],
attachment_type: contentType,
};
} catch (e) {
logger.error('Error getting image payload', {

Loading…
Cancel
Save