RelationsService.ts 553 B

123456789101112131415
  1. import { Service } from '@tsed/di';
  2. import { Relation } from '~/entities/relation';
  3. @Service()
  4. export class RelationsService {
  5. isSupportedGrowiCommandForSingleUse(relation:Relation, growiCommandType:string):boolean {
  6. return !relation.isExpiredCommands() && relation.supportedCommandsForSingleUse.includes(growiCommandType);
  7. }
  8. isSupportedGrowiCommandForBroadcastUse(relation:Relation, growiCommandType:string):boolean {
  9. return !relation.isExpiredCommands() && relation.supportedCommandsForBroadcastUse.includes(growiCommandType);
  10. }
  11. }