-
Notifications
You must be signed in to change notification settings - Fork 5
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
Backend/room wsc #7
base: master
Are you sure you want to change the base?
Conversation
…a room. i.e. {'type': 'message.filter.room(roomID)', 'content': [...] }
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.
There are several copy-paste errors in this pull request.
There are other things that I'm not sure if they are necessary or not.
@@ -0,0 +1,39 @@ | |||
# -*- coding: UTF-8 -*- | |||
|
|||
# COPYRIGHT (c) 2016 Cristóbal Ganter |
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.
Maybe you should license this module as your own.
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
from .wsclass import RoomsWSC # noqa | ||
from . import patches # noqa |
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.
I see no reason to use noqa here.
class RoomIsNotDefined(AttributeError): | ||
"""Raise when ``room`` is not defined. | ||
|
||
``course`` should be defined in the current instance of |
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.
room should be defined ...
copy paste error
""" | ||
|
||
def __init__(self, *args): | ||
"""Initialize a new CourseIsNotDefined exception.""" |
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.
Again, bad copy paste
def __init__(self, *args): | ||
"""Initialize a new CourseIsNotDefined exception.""" | ||
super().__init__( | ||
'Attempted to use the `course` attribute, but ' |
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.
bad copy paste
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
from .wsclass import RoomsWSC # noqa |
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 import is not used here
from src.db import Course, User | ||
|
||
|
||
class RoomsWSC(src.wsclass.WSClass): |
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.
I'm not sure why is this necessary.
@@ -174,6 +174,52 @@ def load_user(self, token): | |||
) | |||
raise ite from norfdb | |||
|
|||
@subscribe('message.filter.student', 'l') |
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 should not be part of this branch.
Added a room message. This allows a message to reach every client in … …
…a room.
i.e.
{'type': 'message.filter.room(roomID)',
'content': [...] }