aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-05-08 20:54:59 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-05-09 19:44:37 -1000
commit11e894c5c9efbc6ee141f614eea3a328517aee5b (patch)
tree2e92f71105895cebc0819d22f17db198e47d05b2
parent8a7b661c6e85a7abf568132effac4b68ffe51a6a (diff)
downloadpatchfoo-11e894c5c9efbc6ee141f614eea3a328517aee5b.tar.gz
patchfoo-11e894c5c9efbc6ee141f614eea3a328517aee5b.zip
Exclude channel from list if all its subscribers unsubscribed
-rw-r--r--lib/app.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/app.js b/lib/app.js
index a76687c..8a74dbb 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -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
}),