UNPKG

pubnub-vue

Version:

Publish & Subscribe Real-time Messaging with PubNub

15 lines (13 loc) 350 B
/** * Clean the stack of messages for a channel or a set of channels * * @param {string|[string]} channel */ export function clean(channel) { if (this._broadcast.isSubscribe('message', channel)) { this._data.messages[channel] = []; } if (this._broadcast.isSubscribe('presence', channel)) { this._data.presence[channel] = {}; } }