From 3dde23a3d4d323368ac53944b6250a81da5eba89 Mon Sep 17 00:00:00 2001 From: Ian Jennings Date: Tue, 27 Sep 2016 16:25:00 -0500 Subject: [PATCH] reference correct channel in options.message, remove console.logs --- bower.json | 2 +- pubnub-mapbox.js | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/bower.json b/bower.json index 8d492bd..6c95513 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "eon-map", - "version": "0.3.0", + "version": "0.3.1", "homepage": "https://github.com/pubnub/eon-map", "authors": [ "Ian Jennings " diff --git a/pubnub-mapbox.js b/pubnub-mapbox.js index 5d2aa94..4f5af62 100644 --- a/pubnub-mapbox.js +++ b/pubnub-mapbox.js @@ -85,8 +85,6 @@ window.eon.m = { clog('Markers:', 'Updating'); - console.log(seed) - for(var key in seed) { if(seed.hasOwnProperty(key)) { @@ -211,7 +209,7 @@ window.eon.m = { message = options.transform(m.message); - options.message(message, m.timetoken, channel); + options.message(message, m.timetoken, m.channel); self.update(message, true); } @@ -224,14 +222,13 @@ window.eon.m = { if(options.history) { self.pubnub.history({ - channel: options.channel + channel: options.channel, + includeTimetoken: true }, function(status, payload) { - console.log(status, payload) - for(var a in payload.messages) { payload.messages[a].entry = options.transform(payload.messages[a].entry); - options.message(payload.messages[a].entry, payload.messages[a].timetoken, channel); + options.message(payload.messages[a].entry, payload.messages[a].timetoken, options.channel); self.update(payload.messages[a].entry, true); }