When you receive a notification you cannot reply to, data._raw.notification will be undefined.
This PR adds a check to see if it exists before trying to grab the pid. If you cannot reply to the notification (not a post), then the Reply-To header will not be set (and the module no longer crashes \o/).
When you receive a notification you cannot reply to,
data._raw.notification
will be undefined. This PR adds a check to see if it exists before trying to grab thepid
. If you cannot reply to the notification (not a post), then theReply-To
header will not be set (and the module no longer crashes \o/).