mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
doc for matrix intent listener.
This commit is contained in:
parent
f0caef06f7
commit
2d1789b11c
@ -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 {
|
export class MatrixIntentListener extends EventEmitter implements MatrixEmitter {
|
||||||
constructor(private readonly mjolnirId: string) {
|
constructor(private readonly mjolnirId: string) {
|
||||||
super()
|
super()
|
||||||
|
Loading…
Reference in New Issue
Block a user