import EventEmitter from "events" ; import { Intent } from "matrix-bot-sdk" ; import { BridgeConfig } from "./Config/Config" ; import { UserTokenStore } from "./UserTokenStore" ; export interface AdminAccountData { admin_user : string ; github ? : { notifications ? : { enabled : boolean ; participating ? : boolean ; } ; } ; gitlab ? : { [ instanceUrl ] : { notifications : { enabled : boolean ; } ; } ; } ; } export abstract class AdminRoomCommandHandler extends EventEmitter { public get accountData ( ) { return { ... this . data } ; } public get userId ( ) { return this . data . admin_user ; } constructor ( protected readonly botIntent , public readonly roomId , protected tokenStore , protected readonly config , protected data ) { super ( ) ; } public async sendNotice ( noticeText ) { return this . botIntent . sendText ( this . roomId , noticeText , "m.notice" ) ; } }