-
-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More typescript linting #3310
More typescript linting #3310
Changes from all commits
4c15d65
1efda62
b517161
556f3bc
a9bddfd
b7c0c34
909b720
8b45f28
9f13e18
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,6 +138,7 @@ module.exports = { | |
tryExtensions: [".ts"], | ||
}, | ||
], | ||
"no-extra-boolean-cast": "error", | ||
}, | ||
}, | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1445,7 +1445,7 @@ export class GroupCall extends TypedEventEmitter< | |
* Recalculates and updates the participant map to match the room state. | ||
*/ | ||
private updateParticipants(): void { | ||
const localMember = this.room.getMember(this.client.getUserId()!)!; | ||
const localMember = this.room.getMember(this.client.getSafeUserId()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here it seems to be fine to just remove the exclamation mark but keep the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, as |
||
if (!localMember) { | ||
// The client hasn't fetched enough of the room state to get our own member | ||
// event. This probably shouldn't happen, but sanity check & exit for now. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need the save version of this of getUserId already returns a non optional?
What is the difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a stub for MatrixClient,
getUserId
actually returnsstring | null
The code under test was changed to use
getSafeUserId
to avoid gettingnull
and thus the test must also make this method available so it doesn't end up throwing an exception