/
IPostMessageDeleted.ts
27 lines (25 loc) · 1.09 KB
/
IPostMessageDeleted.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
import { IHttp, IModify, IPersistence, IRead } from '../accessors';
import { IMessage } from './IMessage';
/** Handler for after a message is deleted. */
export interface IPostMessageDeleted {
/**
* Enables the handler to signal to the Apps framework whether
* this handler should actually be executed for after the message
* has been deleted.
*
* @param message The message which was deleted
* @param read An accessor to the environment
* @param http An accessor to the outside world
* @returns whether to run the executor function
*/
checkPostMessageDeleted?(message: IMessage, read: IRead, http: IHttp): Promise<boolean>;
/**
* Method called *after* the message has been deleted.
*
* @param message The message which was deleted
* @param read An accessor to the environment
* @param http An accessor to the outside world
* @param persistence An accessor to the App's persistence
*/
executePostMessageDeleted(message: IMessage, read: IRead, http: IHttp, persistence: IPersistence, modify: IModify): Promise<void>;
}