aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/app.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/app.js b/lib/app.js
index b312506..814bfb6 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -874,11 +874,15 @@ App.prototype.filterMessages = function (opts) {
App.prototype.streamChannel = function (opts) {
// prefer ssb-backlinks to ssb-query because it also handles hashtag mentions
if (this.sbot.backlinks) return this.filter(this.sbot.backlinks, opts, {
- dest: '#' + opts.channel,
+ dest: /\*$/.test(opts.channel)
+ ? {$prefix: '#' + opts.channel.replace(/\*$/, '')}
+ : '#' + opts.channel
})
if (this.sbot.query) return this.filter(this.sbot.query, opts, {
- value: {content: {channel: opts.channel}},
+ value: {content: {channel: /\*$/.test(opts.channel)
+ ? {$prefix: opts.channel.replace(/\*$/, '')}
+ : opts.channel}},
})
return pull.error(new Error(