I have installed Openfire 3.6.4 to work with Metajack's book.
Sketchcast.
js from chapter 9 should be updated in several places.
1) .c('field', {"var": "pubsub#persist_items"})
.c('value').t("1")
//instead old .t("true")
2)
subid variable should be added to the SketchCast object. When subscriber send iq query to get items from pubsub, there should be subid='
value_of_subid' included as items attribute. So here are changes:
// subscription callbacks
subscribed: function (iq) {
SketchCast.subid = $(iq).find('subscription').attr('subid');
$(document).trigger("reception_started");
},
// get missed events
SketchCast.connection.sendIQ(
$iq({to: SketchCast.service, type: "get"})
.c('pubsub', {xmlns: SketchCast.NS_PUBSUB})
.c('items', {node: SketchCast.node
,subid:SketchCast.subid}),
SketchCast.on_old_items);
And do not forget
subid:null after disconnection and errors.