File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1+ Use `type=m.login.application` when registering appservice users, to comply with the spec.
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ const returnFirstNumber = (...args: unknown[]) => {
7979
8080const DEFAULT_CACHE_TTL = 90000 ;
8181const DEFAULT_CACHE_SIZE = 1024 ;
82+ export const APPSERVICE_REGISTER_TYPE = "m.login.application_service" ;
8283
8384export type PowerLevelContent = {
8485 // eslint-disable-next-line camelcase
@@ -1046,9 +1047,12 @@ export class Intent {
10461047 }
10471048 let registerRes ;
10481049 if ( forceRegister || ! this . opts . registered ) {
1049- const localpart = ( new MatrixUser ( userId ) ) . localpart ;
1050+ const username = ( new MatrixUser ( userId ) ) . localpart ;
10501051 try {
1051- registerRes = await this . botClient . register ( localpart ) ;
1052+ registerRes = await this . botClient . registerRequest ( {
1053+ type : APPSERVICE_REGISTER_TYPE ,
1054+ username,
1055+ } ) ;
10521056 this . opts . registered = true ;
10531057 }
10541058 catch ( err ) {
You can’t perform that action at this time.
0 commit comments