Validate param

This commit is contained in:
syuilo 2018-10-20 09:31:52 +09:00
parent 6cc6401fa0
commit adedffa4a8

View File

@ -15,6 +15,8 @@ export default class extends Channel {
const q: Array<string[]> = params.q;
if (q == null) return;
// Subscribe stream
this.subscriber.on('hashtag', async note => {
const matched = q.some(tags => tags.every(tag => note.tags.map((t: string) => t.toLowerCase()).includes(tag.toLowerCase())));