-
Notifications
You must be signed in to change notification settings - Fork 3
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
Send and handle leave messages for XMPP MUC #246
Conversation
Creating the ActivityStream object is not needed when leaving an IRC room.
app/services/coms.js
Outdated
@@ -173,7 +173,7 @@ export default class ComsService extends Service { | |||
leaveChannel (channel) { | |||
switch (channel.protocol) { | |||
case 'XMPP': | |||
// TODO implement | |||
this.xmpp.leave(channel); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can actually remove the protocol switch now, and do something like this:
this.getServiceForSockethubPlatform(channel.protocol)
.leave(channel);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Had just one nit to pick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've also added handling of the incoming "unavailable" presence updates that were fixed in sockethub/sockethub#565. Now everything should be working dandy. EDIT: Travis is green as well now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works like a charm! 🚀
Closes #239
During testing I noticed that Sockethub actually sends "online" presence updates for incoming "unavailable" stanzas. I've created an issue for that at sockethub/sockethub#564.
This PR also deletes the creation of the ActivityStream object when leaving an IRC room, because I confirmed that it's not needed.