peertube-plugin-livechat/conversejs/lib/slow-mode/plugin.ts
John Livingston 1e876ec43c
Slow Mode WIP (#192):
* frontend: display an infobox when slow mode is active (WIP)
2024-02-16 17:35:55 +01:00

15 lines
562 B
TypeScript

/**
* Slow Mode plugin definition.
* This code should be published to ConverseJS upstream once the XEP for the slow mode feature is proposed.
* Note: part of the code is also in the custom muc-bottom-panel template.
*/
export const slowModePlugin = {
dependencies: ['converse-muc', 'converse-muc-views'],
async initialize (this: any) {
const _converse = this._converse
_converse.api.listen.on('chatRoomInitialized', function (this: any, _model: any): void {
// TODO: disable the textarea after each new message, for X seconds.
})
}
}