-
Notifications
You must be signed in to change notification settings - Fork 10
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
Check room membership before processing events in room resource #2179
base: main
Are you sure you want to change the base?
Conversation
d78af75
to
ebb034f
Compare
ebb034f
to
e8d8ef8
Compare
if (!memberIds) { | ||
return; | ||
} | ||
if (!memberIds.includes(this.matrixService.aiBotUserId)) { |
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.
nit: you could collapse this into a single if
using an "or"
@@ -44,6 +44,14 @@ export default class Room { | |||
?.name; | |||
} | |||
|
|||
get memberIds(): string[] { |
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 seems like something that should be using @cached
no? every call to this property will run this logic
assert.dom('[data-test-profile-display-name]').hasText(''); // No display name set yet | ||
assert | ||
.dom('[data-test-profile-icon]') | ||
.hasStyle({ backgroundColor: 'rgb(34, 221, 152)' }); | ||
.hasStyle({ backgroundColor: 'rgb(88, 226, 29)' }); |
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.
what happened here?
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.
The "server" of the testuser changed from staging to localhost, which results in a different color for the avatar background
@@ -1030,7 +1030,7 @@ module('Acceptance | operator mode tests', function (hooks) { | |||
assert.dom('[data-test-profile-icon]').hasText('T'); | |||
assert | |||
.dom('[data-test-profile-icon]') | |||
.hasStyle({ backgroundColor: 'rgb(34, 221, 152)' }); | |||
.hasStyle({ backgroundColor: 'rgb(88, 226, 29)' }); |
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.
ditto
No description provided.