diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-05-08 20:54:59 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-05-09 19:44:37 -1000 |
commit | 11e894c5c9efbc6ee141f614eea3a328517aee5b (patch) | |
tree | 2e92f71105895cebc0819d22f17db198e47d05b2 | |
parent | 8a7b661c6e85a7abf568132effac4b68ffe51a6a (diff) | |
download | patchfoo-11e894c5c9efbc6ee141f614eea3a328517aee5b.tar.gz patchfoo-11e894c5c9efbc6ee141f614eea3a328517aee5b.zip |
Exclude channel from list if all its subscribers unsubscribed
-rw-r--r-- | lib/app.js | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -270,6 +270,9 @@ App.prototype.streamChannels = function (opts) { return pull( this.sbot.messagesByType({type: 'channel', reverse: true}), this.unboxMessages(), + pull.filter(function (msg) { + return msg.value.content.subscribed + }), pull.map(function (msg) { return msg.value.content.channel }), |