Comments (6)
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.
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.
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.
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.
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.
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)
- How to integrate this lib with a Rails app? HOT 6
- Extract slack-ruby-bot-server-realtime HOT 1
- gem 'cursor_pagination' is conflicting with rails model generator HOT 2
- https://slack-ruby-bot-server.herokuapp.com no longer has a mongodb HOT 2
- oauth_authorization_url_mismatch for new slack apps HOT 5
- Migration guide for legacy Slack apps to Granular Scopes
- Unable to use Postgres HOT 5
- NameError: uninitialized constant SlackRubyBotServer::Api::Presenters::TeamPresenter::Boolean w/mongoid 7.3.x HOT 5
- Add support for socket mode HOT 4
- Replace cursor_pagination HOT 12
- Add to Slack button - Redirect Endpoint? HOT 1
- What about this gem sets it up to show the Add To Slack button? HOT 3
- Document adding a RESTful API HOT 5
- Bot doesn't handle being removed from the last Organization on Slack side HOT 2
- Is there anyway to extend the Team model to add my own attributes? HOT 11
- Prevent test workflows from running when updating docs only HOT 1
- Release 2.1.0 HOT 1
- Disabling/Hiding some teams endpoints. HOT 4
- Configuring Log Level HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slack-ruby-bot-server.