fix: isModOf

This commit is contained in:
cha0s 2020-12-13 11:06:24 -06:00
parent c2d2bece0d
commit b7137e468f

View File

@ -1,6 +1,6 @@
import {ModelMap, Op, Types} from '@latus/db';
import {parseChannel} from '@reddichat/core/client';
import {parseChannel, renderChannel} from '@reddichat/core/client';
export default (User, latus) => class UserReddichat extends User {
@ -40,7 +40,7 @@ export default (User, latus) => class UserReddichat extends User {
}
async isModOf(channel) {
return 'r' === channel.type && -1 !== (await this.modOf).indexOf(channel.name);
return -1 !== (await this.modOf).indexOf(renderChannel(channel));
}
};