-
Notifications
You must be signed in to change notification settings - Fork 0
/
RemainderApp.ts
35 lines (33 loc) · 1.25 KB
/
RemainderApp.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import {
IAppAccessors,
IConfigurationExtend,
IEnvironmentRead,
ILogger,
IModify,
IPersistence,
IRead,
} from '@rocket.chat/apps-engine/definition/accessors';
import { App } from '@rocket.chat/apps-engine/definition/App';
import { IAppInfo } from '@rocket.chat/apps-engine/definition/metadata';
import { RemindCommand } from './src/commands/remainder';
import { ExecuteViewSubmitHandler } from './src/handlers/ExecuteViewSubmitHandler';
import { UIKitViewSubmitInteractionContext } from '@rocket.chat/apps-engine/definition/uikit';
export class RemainderApp extends App {
constructor(info: IAppInfo, logger: ILogger, accessors: IAppAccessors) {
super(info, logger, accessors);
}
public async extendConfiguration(
configuration: IConfigurationExtend,
environmentRead: IEnvironmentRead,
): Promise<void> {
configuration.slashCommands.provideSlashCommand(new RemindCommand(this));
}
public async executeViewSubmitHandler(
context: UIKitViewSubmitInteractionContext,
read: IRead,
modify: IModify,
persistence: IPersistence) {
const handler = new ExecuteViewSubmitHandler(this, context, modify, read, persistence);
handler.run(context);
}
}