Comparing version 0.1.20 to 0.1.21
@@ -193,7 +193,8 @@ ;(function() { | ||
_unhandled: function(error, response, event) { | ||
console.warn('Unhandled Event', | ||
'\nEvent:', event, | ||
'\nCommand:', response.meta.type, | ||
'\nError:', error, | ||
'\nResponse:', response); | ||
console.warn('Unhandled Event', { | ||
event: event, | ||
command: response.meta.type, | ||
error: error, | ||
response: response | ||
}); | ||
}, | ||
@@ -422,2 +423,23 @@ // Default `connect` callback. | ||
} | ||
}, | ||
sendOfflineMessage: function(data, callback) { | ||
var _data = { | ||
uri: '/sendEmail', | ||
method: 'POST', | ||
body: data | ||
}; | ||
_.extend(_data, this.parent.info); | ||
var payload = { | ||
meta: this.parent.generateMeta({ | ||
type: 'sendOfflineMessage' | ||
}), | ||
data: _data | ||
}; | ||
this.parent.emit('client session event', payload); | ||
if (typeof callback === 'function') { | ||
this.parent.replyCallbacks[payload.meta.id] = callback; | ||
} | ||
} | ||
@@ -424,0 +446,0 @@ }, |
{ | ||
"name": "help-fem", | ||
"version": "0.1.20", | ||
"version": "0.1.21", | ||
"description": "A Browserify/Node.js client module for the Help.com team's FEM.", | ||
@@ -5,0 +5,0 @@ "main": "help-fem.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25996
667