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

Fix chat.py example #12

Closed
sebastibe opened this issue Mar 14, 2012 · 6 comments · Fixed by #23 or #25
Closed

Fix chat.py example #12

sebastibe opened this issue Mar 14, 2012 · 6 comments · Fixed by #23 or #25

Comments

@sebastibe
Copy link
Contributor

Get the chat.py simple example working.

@suzanshakya
Copy link

Why the chat.py is not working yet?

@dmfrancisco
Copy link

@suzanshakya I'm also trying to run the examples. I had to change this in the chat.py file:

self.emit_to_room('msg_to_room', msg, 'main_room')

To this:

self.emit_to_room('main_room', 'msg_to_room', msg)

I'm using the version 0.3.5 beta (although the init file says it's version 0.3.1).
Hope this helps.

@suzanshakya
Copy link

@dmfrancisco Thanks, that worked but own message is displayed twice as 'me' and given nickname.
@dkoneill Thanks. That works like a charm.

@dmfrancisco
Copy link

@suzanshakya Yes, there is a broadcast_event_not_me method (which broadcasts to everyone except itself) but there isn't a emit_to_room_not_me method. However, it's simple to extend the default RoomsMixin and add such method. Here is how I've done it: https://gist.github.com/951e149d62b048e9e468
Hope this helps.

EDIT: I had not seen @dkoneill commit. It seems the issue is solved :)

@suzanshakya
Copy link

@dmfrancisco That seems to work. But I'll settle with @dkoneill commit for now.

@philipn
Copy link
Contributor

philipn commented Jun 30, 2012

This looks fixed. Can we close?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants