Update the index metadata cache

pull/1/head
yflory 5 years ago
parent 5f37aae990
commit ea37166dc2

@ -717,6 +717,9 @@ module.exports.create = function (cfg) {
if (channel && metadata_cache[channel] && typeof (metadata) === "object") { if (channel && metadata_cache[channel] && typeof (metadata) === "object") {
Log.silly('SET_METADATA_CACHE', 'Channel '+ channel +', metadata: '+ JSON.stringify(metadata)); Log.silly('SET_METADATA_CACHE', 'Channel '+ channel +', metadata: '+ JSON.stringify(metadata));
metadata_cache[channel] = metadata; metadata_cache[channel] = metadata;
if (ctx.channels[channel] && ctx.channels[channel].index) {
ctx.channels[channel].index.metadata = metadata;
}
historyKeeperBroadcast(ctx, channel, metadata); historyKeeperBroadcast(ctx, channel, metadata);
} }
}; };

Loading…
Cancel
Save