doc for matrix intent listener.

This commit is contained in:
gnuxie 2022-12-06 13:55:37 +00:00
parent f0caef06f7
commit 2d1789b11c

View File

@ -221,6 +221,13 @@ export class ManagedMjolnir {
}
}
/**
* This is used to listen for events intended for a single mjolnir that resides in the appservice.
* This exists entirely because the Mjolnir class was previously designed only to receive events
* from a syncing matrix-bot-sdk MatrixClient. Since appservices provide a transactional push
* api for all users on the appservice, almost the opposite of sync, we needed to create an
* interface for both. See `MatrixEmitter`.
*/
export class MatrixIntentListener extends EventEmitter implements MatrixEmitter {
constructor(private readonly mjolnirId: string) {
super()