Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

craguila
Copy link
Member

Added a room message. This allows a message to reach every client in … …
…a room.

i.e.
{'type': 'message.filter.room(roomID)',
'content': [...] }

@cganterh cganterh added this to the Question Module milestone Feb 29, 2016
@cganterh cganterh self-assigned this Feb 29, 2016
Copy link
Member

@cganterh cganterh left a 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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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."""
Copy link
Member

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 '
Copy link
Member

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
Copy link
Member

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):
Copy link
Member

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')
Copy link
Member

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.

@cganterh cganterh removed this from the Alternatives Module milestone Oct 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants