-
Notifications
You must be signed in to change notification settings - Fork 103
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
labhub.py: Alert when @mention is not in room #630
base: master
Are you sure you want to change the base?
Conversation
Obviously the tests will fail as I have removed the |
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.
tests need to be fixed.
@jayvdb Can you please check the warning message so that I can make changes to the tests? |
No. Fixing/adding unit tests are an integral part of changing code. |
The fix introduces removal of is_room_member function and instead uses callback_message to warn whenever `@mention` is not in room. Closes coala#603
Blocked until errbotio/err-backend-gitter#38 is solved. |
@@ -193,6 +185,26 @@ def callback_message(self, msg): | |||
self.send(msg.frm, response) | |||
self.hello_world_users.add(user) | |||
|
|||
mentioned = [] | |||
room_members = msg.frm.room.occupants |
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.
We need to fetch the people once reducing the number of API calls and eventually update the list as soon as there are new people in the room, will improve this later on once we've fixed backend.
The fix introduces removal of is_room_member
function and instead uses callback_message to warn
whenever
@mention
is not in room.Closes #603
Reviewers Checklist
botcmd
andre_botcmd
decorators.