Browse files

Minor bug fixes.

  • Loading branch information...
1 parent 465e6b7 commit 198e5dd580e0344e608d0c83c2e40de8b98e776b geremy cohen committed Dec 17, 2012
Showing with 5 additions and 3 deletions.
  1. +4 −2 javascript/3.4/crypto/encrypt-pubnub.js
  2. +1 −1 javascript/3.4/tests/unit-test.html
View
6 javascript/3.4/crypto/encrypt-pubnub.js
@@ -40,15 +40,17 @@ PUBNUB.secure = (function () {
var pubnub = PUBNUB.init(setup);
return {
+ time: PUBNUB.time,
+
publish: function (args) {
args.message = encrypt(args.message);
return pubnub.publish(args);
},
subscribe: function (args) {
var callback = args.callback;
- args.callback = function (message) {
+ args.callback = function (message, envelope, channel) {
var decrypted = decrypt(message);
- decrypted && callback(decrypted);
+ decrypted && callback(decrypted, envelope, channel);
}
return pubnub.subscribe(args);
View
2 javascript/3.4/tests/unit-test.html
@@ -110,7 +110,7 @@
====================================================================== */
p.bind( 'mousedown,touchstart', start_button, start_test );
function start_test() {
- test.plan = 58 + many_con_tst*3; // # of tests
+ test.plan = 43 + many_con_tst*3; // # of tests
test.done = 0; // 0 tests done so far
test.pass = 0; // 0 passes so far
test.fail = 0; // 0 failes so far

0 comments on commit 198e5dd

Please sign in to comment.