Giter VIP home page Giter VIP logo

Comments (6)

dblock avatar dblock commented on August 17, 2024

I think you could just implement the re-install workflow and succeed in that case instead of raising an error?

from slack-ruby-bot-server.

amar-sharma avatar amar-sharma commented on August 17, 2024

I've to re implement the whole teams_endpoint or have to maintain two redirect URLs? Not sure if it is ideal, I am wondering what that exception's purpose is? Because we would want new tokens to be updated in Teams model in case user re-installs?
Sorry if that doesn't make sense, new to Slack bot Dev.

from slack-ruby-bot-server.

dblock avatar dblock commented on August 17, 2024

@amar-sharma

You definitely don't want to reimplement the endpoint and maintain 2 URLs, just get rid of the exception. But you can't remove it, its original intent is to avoid calling activate! which in RTM starts a new instance of a bot. If you do that, you'll end up with 2 connections both responding, which is ... bad. For RTM implementations you'd need to find a way to shutdown the existing connection, and start a new one, which is non-trivial, or raise as we do now but elsewhere. For event-based bots this is no longer useful because there's no "start" of any kind of worker and you could theoretically call activate! as many times as you want because it does nothing.

All of this needs to be tested and confirmed.

from slack-ruby-bot-server.

amar-sharma avatar amar-sharma commented on August 17, 2024

So the activate is only used for RTM, If I am not using RTM I can just get rid of activate! all together?
How about team.deactivate id if team.active? instead of raise and let it proceed?

from slack-ruby-bot-server.

dblock avatar dblock commented on August 17, 2024

does not do what you think it does, it marks the team inactive, doesn't shutdown the connection, etc.

In your own code I think it's safe to just remove both the exception and activate!, but I would double-check. You should try and make this work in a PR here though or you'll have a hard time tracking this in the future since it's sort of an interface.

from slack-ruby-bot-server.

amar-sharma avatar amar-sharma commented on August 17, 2024

okay thank you for the response, I'll look into the code, find a way to reopen the connection and create a PR.

from slack-ruby-bot-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.