Send the error to chainpad when a patch is not sent

This commit is contained in:
yflory
2020-03-16 12:06:18 +01:00
parent 27c1291182
commit d69ad7c0e6
2 changed files with 6 additions and 2 deletions

View File

@@ -1599,7 +1599,10 @@ define([
onConnect: function (wc, sendMessage) {
channel.sendMessage = function (msg, cId, cb) {
// Send to server
sendMessage(msg, function () {
sendMessage(msg, function (err) {
if (err) {
return void cb({ error: err });
}
// Broadcast to other tabs
channel.pushHistory(CpNetflux.removeCp(msg), /^cp\|/.test(msg));
channel.bcast("PAD_MESSAGE", {