mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 09:33:08 +02:00
Validate param
This commit is contained in:
parent
70897c0e9a
commit
13f381710c
1 changed files with 2 additions and 0 deletions
|
@ -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())));
|
||||
|
|
Loading…
Reference in a new issue