Commit 43f049c4 authored by nanahira's avatar nanahira

fix

parent 4ec32d72
import { Adapter, Bot, Context, Filter, s } from 'koishi'; import { Adapter, Bot, Context, Filter } from 'koishi';
import _ from 'lodash'; import _ from 'lodash';
import { RegisterSchema, SchemaProperty } from 'schemastery-gen'; import { RegisterSchema, SchemaProperty } from 'schemastery-gen';
...@@ -71,7 +71,7 @@ export class SendTarget { ...@@ -71,7 +71,7 @@ export class SendTarget {
let filters: Filter[] = []; let filters: Filter[] = [];
if (this.users?.length) { if (this.users?.length) {
const userSet = new Set(this.users); const userSet = new Set(this.users);
filters.push((s) => s.type === 'private' && userSet.has(s.userId)); filters.push((s) => s.subtype === 'private' && userSet.has(s.userId));
} }
if (this.channels?.length) { if (this.channels?.length) {
filters = filters.concat(this.channels.map((c) => c.toFilter())); filters = filters.concat(this.channels.map((c) => c.toFilter()));
......
describe('Sample test.', () => { describe('Target def.', () => {
it('should pass', () => { it('register correct context', () => {
expect(true).toBe(true); expect(true).toBe(true);
}); });
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment