matrix-appservice-discord icon indicating copy to clipboard operation
matrix-appservice-discord copied to clipboard

Tell the homeserver if a room alias request failed

Open jaller94 opened this issue 5 years ago • 7 comments

Adds more TypeScript annotations to MatrixRoomHandler.

jaller94 avatar Dec 31 '20 16:12 jaller94

What is supposed to happen here? https://github.com/Half-Shot/matrix-appservice-discord/blob/c29cfc72f55f1f81e43e2d71f5c080d752d1a884/src/discordas.ts#L193-L194

createRoomOpts can be undefined.

jaller94 avatar Dec 31 '20 17:12 jaller94

@jaller94 If createRoomOpts comes back as undefined, we should call createRoom with false and return early, which will tell the homeserver that the alias request failed.

Half-Shot avatar Jan 06 '21 10:01 Half-Shot

I resolved the merge conflict.

jaller94 avatar Jan 26 '21 10:01 jaller94

According to the type definition in matrixroomhandler.ts the property createRoomOpts.__roomId does not exist.

jaller94 avatar Jan 26 '21 11:01 jaller94

https://github.com/turt2live/matrix-bot-sdk/blob/master/src/appservice/Appservice.ts#L694

Permalink: https://github.com/turt2live/matrix-bot-sdk/blob/d4877afd9c3555970eeb047d4ed590955b58709a/src/appservice/Appservice.ts#L694

Half-Shot avatar Jan 26 '21 11:01 Half-Shot

Ok, I added it to the type in matrixroomhandler.ts.

jaller94 avatar Jan 26 '21 11:01 jaller94

In reply to https://github.com/matrix-org/matrix-appservice-discord/pull/655#issuecomment-767471239

@Half-Shot __index doesn't seem to be in the code of matrix-bot-sdk anymore.

jaller94 avatar Aug 11 '22 21:08 jaller94