From b7137e468fc4068e1d82ac3d686e79a2f6894cd9 Mon Sep 17 00:00:00 2001 From: cha0s Date: Sun, 13 Dec 2020 11:06:24 -0600 Subject: [PATCH] fix: isModOf --- packages/user/src/models/user-reddichat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/user/src/models/user-reddichat.js b/packages/user/src/models/user-reddichat.js index 1184410..e71c597 100644 --- a/packages/user/src/models/user-reddichat.js +++ b/packages/user/src/models/user-reddichat.js @@ -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)); } };