diff options
-rw-r--r-- | lib/app.js | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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( |