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

Implode isn't working for rooms that is part of a team #42

Open
dlsagayaraj opened this issue Dec 30, 2020 · 2 comments
Open

Implode isn't working for rooms that is part of a team #42

dlsagayaraj opened this issue Dec 30, 2020 · 2 comments

Comments

@dlsagayaraj
Copy link

Unable to implode rooms which are part of a teams, This used to work earlier and we have used it. But now it seems to fail with the following error in the log

Potentially unhandled rejection [1] Error: Can not implode a 1:1 or Team room

Steps to Reproduce:

  1. Create a team
  2. Create a space for that team
  3. invoke implode from that space
framework.hears('/implode', function(bot, trigger) {
  bot.implode();
});
@jpjpjp
Copy link
Collaborator

jpjpjp commented Dec 31, 2020

Hi @dlsagayaraj this is in fact the designed behavior as bot.implode is designed to fail for 1-1 or teams rooms. TBH I'm not sure WHY it is designed to fail for a space that is part of a team, but I'm certain that has existed since the framework was first created as this appears to be leftover from the flint code that this framework is inherited from.

Are you certain this worked before (for spaces that were part of a team)? I'm dubious.

With that said, I'm not opposed to changing the framework to remove this limitation. As I said, I'm not sure why it was originally implemented that way. I've started a discussion about this in the "Webex Node Bot Framework" space on Webex if you'd like to comment more there.

In the meantime, here's a workaround (note that the promise will reject if the space is a 1-1 space (since Webex prevents these from being deleted, or if the room is moderated).

framework.hears('/implode', function(bot, trigger) {
  bot.webex.rooms.remove(bot.room);
});

@dlsagayaraj
Copy link
Author

dlsagayaraj commented Dec 31, 2020

Thank you @jpjpjp , I will try this workaround. Btw, Yes i am sure this had been working earlier. I had been using this implode function to archive the unused spaces in a team. I have used it in 40+ spaces of the same team. Thanks for starting the discussion with the webex support team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants