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

Send and handle leave messages for XMPP MUC #246

Merged
merged 4 commits into from
Sep 1, 2021
Merged

Conversation

galfert
Copy link
Contributor

@galfert galfert commented Aug 31, 2021

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.

Creating the ActivityStream object is not needed when leaving an IRC room.
@@ -173,7 +173,7 @@ export default class ComsService extends Service {
leaveChannel (channel) {
switch (channel.protocol) {
case 'XMPP':
// TODO implement
this.xmpp.leave(channel);
Copy link
Member

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);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point 👍

Copy link
Member

@raucao raucao left a 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.

Copy link
Member

@raucao raucao left a comment

Choose a reason for hiding this comment

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

check

@galfert
Copy link
Contributor Author

galfert commented Aug 31, 2021

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.

@galfert galfert changed the title Send leave message for XMPP MUC Send and handle leave messages for XMPP MUC Aug 31, 2021
@galfert galfert requested a review from raucao August 31, 2021 18:04
Copy link
Member

@raucao raucao left a 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! 🚀

@raucao raucao merged commit 68bc9ba into master Sep 1, 2021
@raucao raucao deleted the feature/239-xmpp_leave branch September 1, 2021 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Send "leave" message for XMPP MUC
2 participants