git ssb

16+

Dominic / patchbay



Commit c395c89410dba096bd2c95c1b7aa0e70c2b6ccc8

support callback for after confirming message

Dominic Tarr committed on 6/20/2016, 2:37:31 AM
Parent: f6372a0b47a15d936a760ae37971796e6d433f76

Files changed

modules/message-confirm.jschanged
modules/message-confirm.jsView
@@ -7,15 +7,17 @@
77
88 var publish = plugs.first(exports.publish = [])
99 var message_content = plugs.first(exports.message_content = [])
1010
11-exports.message_confirm = function (content, sbot) {
11+exports.message_confirm = function (content, cb) {
1212
13+ cb = cb || function () {}
14+
1315 var lb = lightbox()
1416 document.body.appendChild(lb)
1517
1618 var okay = h('button', 'okay', {onclick: function () {
17- publish(content); lb.remove()
19+ publish(content); lb.remove(); cb(null, content)
1820 }})
1921
2022 var cancel = h('button', 'cancel', {onclick: function () {
2123 lb.remove()
@@ -50,4 +52,5 @@
5052
5153
5254
5355
56+

Built with git-ssb-web