New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

apn

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apn - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

8

lib/apn.js

@@ -133,5 +133,9 @@ var tls = require('tls');

this.sendNotification = function (note) {
var encoding = 'utf8';
if(note.encoding) {
encoding = note.encoding;
}
var token = note.device.token;
var message = JSON.stringify(note);
var messageLength = Buffer.byteLength(message);
var messageLength = Buffer.byteLength(message, encoding);
var pos = 0;

@@ -171,3 +175,3 @@

pos += int2buf(messageLength, data, pos, 2);
pos += data.write(message, pos);
pos += data.write(message, pos, encoding);

@@ -174,0 +178,0 @@ writeNotificationToSocket(data);

{
"name": "apn",
"description": "An interface to the Apple Push Notification service for Node.js",
"version": "1.1.3",
"version": "1.1.4",
"author": "Andrew Naylor <argon@mkbot.net>",

@@ -6,0 +6,0 @@ "contributors": [

@@ -63,2 +63,4 @@ #node-apn

\* N.B.: If you wish to send notifications containing emoji or other multi-byte characters you will need to set `note.encoding = 'ucs2'`. This tells node to send the message with 16bit characters, however it also means your message payload will be limited to 127 characters.
### Handling Errors

@@ -134,2 +136,6 @@

1.1.4:
* Fixes #15: Sending unified emoji via apn; Added encoding parameter when sending notification
1.1.3:

@@ -136,0 +142,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc