Firebase public relay fix.
Ylian Saint-Hilaire committed
Apr 14, 2021 at 15:24 UTC
7b67e1c521f0d30dfb7b6937f8556e23a17adb6f
1 file changed
+3
-3
firebase.js
+3
-3
@@ -327,13 +327,13 @@ module.exports.CreateFirebaseRelay = function (parent, url, key) {
327
parent.debug('email', 'Firebase-sendToDevice-httpPost');
328
if ((node == null) || (typeof node.pmt != 'string')) return;
329
330
- obj.log('sendToDevice, node:' + node._id + ', payload: ' + JSON.stringify(payload) + ', options: ' + JSON.stringify(options));
331
- const querydata = querystring.stringify({ 'msg': JSON.stringify({ pmt: node.pmt, payload: payload, options: options }) });
332
-
330
// Fill in the server agent cert hash
331
if (payload.data == null) { payload.data = {}; }
332
if (payload.data.shash == null) { payload.data.shash = parent.webserver.agentCertificateHashBase64; } // Add the server agent hash, new Android agents will reject notifications that don't have this.
333
334
+ obj.log('sendToDevice, node:' + node._id + ', payload: ' + JSON.stringify(payload) + ', options: ' + JSON.stringify(options));
335
+ const querydata = querystring.stringify({ 'msg': JSON.stringify({ pmt: node.pmt, payload: payload, options: options }) });
336
+
337
// Send the message to the relay
338
const httpOptions = {
339
hostname: relayUrl.hostname,