Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix chat.py example #12

Closed
sebastibe opened this Issue · 6 comments

4 participants

@sebastibe

Get the chat.py simple example working.

@suzanshakya

Why the chat.py is not working yet?

@dmfrancisco

@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

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

@dmfrancisco

@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

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

@philipn

This looks fixed. Can we close?

@sebastibe sebastibe closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.