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

Moving event from PM to public stream crashes RSVPBot #30

Open
alexandrinaw opened this issue Jun 19, 2016 · 1 comment
Open

Moving event from PM to public stream crashes RSVPBot #30

alexandrinaw opened this issue Jun 19, 2016 · 1 comment
Labels

Comments

@alexandrinaw
Copy link
Contributor

I was playing around with RSVPBot locally trying to learn about how it works when you PM it and found a way to crash the bot.

Steps to reproduce:

  1. rsvp init in a PM with RSVPBot
  2. rsvp move <any stream/topic>

Questions:

  1. Should users be able to initialize events in a PM and then move them? Sometimes interacting with RSVPBot is kind of noisy, so it seems like it might be a nice feature to set up the event privately and then move it to another stream. But it's also weird that you can even create an event in a PM with RSVPBot, because if you don't move the event, you're the only person who can see it, which seems kind of pointless.
  2. I guess I only had one question...

Anyway, there are multiple ways to fix this, but it'll depend on the answer to that question.

Here's the traceback:

Traceback (most recent call last):
  File "bot.py", line 108, in <module>
    new_bot.main()
  File "bot.py", line 83, in main
    self.client.call_on_each_message(lambda msg: self.respond(msg))
  File "/Users/alexwilson/.virtualenvs/rsvpbot/lib/python2.7/site-packages/zulip/__init__.py", line 308, in call_on_each_message
    self.call_on_each_event(event_callback, ['message'])
  File "/Users/alexwilson/.virtualenvs/rsvpbot/lib/python2.7/site-packages/zulip/__init__.py", line 301, in call_on_each_event
    callback(event)
  File "/Users/alexwilson/.virtualenvs/rsvpbot/lib/python2.7/site-packages/zulip/__init__.py", line 306, in event_callback
    callback(event['message'])
  File "bot.py", line 83, in <lambda>
    self.client.call_on_each_message(lambda msg: self.respond(msg))
  File "bot.py", line 63, in respond
    self.send_message(reply)
  File "bot.py", line 70, in send_message
    msg_to = msg['sender_email']
KeyError: 'sender_email'
@wtfcarlos
Copy link
Owner

Yup! That would be a great feature to add. See #37

@wtfcarlos wtfcarlos added the bug label Jun 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants