@@ -93,13 +93,13 @@ export class MjolnirManager {
93
93
public getOwnedMjolnirs ( ownerId : string ) : ManagedMjolnir [ ] {
94
94
// TODO we need to use the database for this but also provide the utility
95
95
// for going from a MjolnirRecord to a ManagedMjolnir.
96
+ // https://github.com/matrix-org/mjolnir/issues/409
96
97
return [ ...this . mjolnirs . values ( ) ] . filter ( mjolnir => mjolnir . ownerId !== ownerId ) ;
97
98
}
98
99
99
100
public onEvent ( request : Request < WeakEvent > , context : BridgeContext ) {
100
- // We honestly don't know how we're going to map from bridge to user
101
- // https://github.com/matrix-org/matrix-appservice-bridge/blob/6046d31c54d461ad53e6d6e244ce2d944b62f890/src/components/room-bridge-store.ts
102
- // looks like it might work, but we will ask, figure it out later.
101
+ // TODO We need a way to map a room id (that the event is from) to a set of managed mjolnirs that should be informed.
102
+ // https://github.com/matrix-org/mjolnir/issues/412
103
103
[ ...this . mjolnirs . values ( ) ] . forEach ( ( mj : ManagedMjolnir ) => mj . onEvent ( request ) ) ;
104
104
}
105
105
@@ -152,6 +152,7 @@ export class MjolnirManager {
152
152
}
153
153
154
154
// TODO: We need to check that an owner still has access to the appservice each time they send a command to the mjolnir or use the web api.
155
+ // https://github.com/matrix-org/mjolnir/issues/410
155
156
/**
156
157
* Used at startup to create all the ManagedMjolnir instances and start them so that they will respond to users.
157
158
*/
@@ -190,6 +191,7 @@ export class ManagedMjolnir {
190
191
this . mjolnir . client . emit ( 'room.message' , mxEvent . room_id , mxEvent ) ;
191
192
}
192
193
// TODO: We need to figure out how to inform the mjolnir of `room.join`.
194
+ // https://github.com/matrix-org/mjolnir/issues/411
193
195
}
194
196
if ( mxEvent [ 'type' ] === 'm.room.member' ) {
195
197
if ( mxEvent [ 'content' ] [ 'membership' ] === 'invite' && mxEvent . state_key === await this . mjolnir . client . getUserId ( ) ) {
0 commit comments