Slow Mode WIP (#192):

* frontend: display an infobox when slow mode is active (WIP)
This commit is contained in:
John Livingston
2024-02-16 14:34:34 +01:00
parent 9efd53b2a7
commit 1e876ec43c
7 changed files with 70 additions and 2 deletions

View File

@ -0,0 +1,14 @@
/**
* 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.
})
}
}