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

join room on invitation #111

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/xmpp.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ class XmppBot extends Adapter
@client.send pong

readMessage: (stanza) =>

if x = stanza.getChild('x', 'jabber:x:conference') and x?.attrs?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could tests be added as well?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@robot.logger.debug '[joining room]', x.attrs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is in x.attrs are there password that shouldn't go into logs?

@options.rooms.push x.attrs
@joinRoom x.attrs

# ignore non-messages
return if stanza.attrs.type not in ['groupchat', 'direct', 'chat']
return if stanza.attrs.from is undefined
Expand Down