-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Support for dynamic slack and rocket channels #6282
Conversation
@@ -5,6 +5,8 @@ logger = new Logger('SlackBridge', { | |||
sections: { | |||
connection: 'Connection', | |||
events: 'Events', | |||
class: 'Class' | |||
class: 'Class', |
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.
Added some more logger sections
@@ -15,8 +15,13 @@ Package.onUse(function(api) { | |||
|
|||
api.addFiles('logger.js', 'server'); | |||
api.addFiles('settings.js', 'server'); |
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.
Broke up the logic from slackbridge into rocket specific and slack specific files
api.addFiles('slackbridge.js', 'server'); | ||
api.addFiles('slashcommand/slackbridge_import.server.js', 'server'); | ||
|
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.
Exporting the objects from Rocket and Slack JS files so they could see each other
} | ||
|
||
} | ||
|
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.
This seemed the most appropriate way to resolve 'require/dependency' so the two JS files could see each other
} | ||
|
||
} | ||
|
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.
This seemed the most appropriate way to resolve 'require/dependency' so the two JS files could see each other
@@ -0,0 +1,58 @@ | |||
Config: |
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 do not know how to implement unit tests inside Rock.Chat yet so I need to keep a script of manual tests I need to run each time
Will be updating to use import/export tomorrow |
3129a57
to
c078d13
Compare
c078d13
to
6b237ee
Compare
@RocketChat/core
The goal of this pull request was to support Slack and Rocket channels coming and going. You had to enable/disable the slack bridge for it to pick up on changes.
Refactored the code into multiple files to allow for easier contributions in the future.
Fixed a 'not defined' error that was polluting the server logs
Improved logging/debugging messages some more