-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add a slash command to subscribe new AWS SNS topics to Mattermost channels #12
Comments
This should probably also allow different topics to be sent to different channels. |
I would be interested in starting to work on this ticket. Before starting to work on this ticket, I have a few questions:
For the time being, I think the previous questions should add enough context to allow me to start the work on this ticket. Thanks. |
Plugins are automatically enabled throughout the server. So they are enabled for all channels. The way I see this feature is to run the following command in a given channel in which you want to receive notifications. This is most other plugins accomplish this: It might be better to only allow one topic at a time, to have a more fluid error-handling experience. Also we should support topic name and full ARN for the args.
Yes, it is a config value set in the system console. It can be accessed through
The package structure would likely need to be refactored, so we can support mocking of interfaces in separate packages. There are examples of this in https://github.com/mattermost/mattermost-plugin-mscalendar .
Fantastic! We would certainly welcome a PR with a Thanks for your great questions and thanks for your interest in contributing @george-cionca!! You're welcome to join our community server and join the channel for this project to work more closely with the team. |
Thanks for your interest and questions, @george-cionca! Do you have any additional questions or need any help getting started? |
Thanks @mickmister and @jfrerich. Sorry for the late reply. I was a bit busy in the past weeks and didn't have the chance to work on this ticket. I plan to get started in the upcoming days. I will come back with further updates once I start to work on it. |
@george-cionca No problem, thanks for following up! |
Sorry for the delay. I was a bit busy in the past months and I didn't have the chance to start the work on this ticket. I started again in the past days and prepared the Docker Compose file for LocalStack. The subscription to an SNS topic is working fine. However, I noticed a missing feature within LocalStack. Initially, I used the following command: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudwatch/set-alarm-state.html to change the state of the CloudWatch alarm to After that, I used the following command: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/events/put-events.html to send a JSON event directly to EventBridge from the command-line with AWS CLI, but the event was not being forwarded to the SNS topic. It's important to note here that before sending the event to EventBridge, I created a rule in EventBridge to use After sending the event to EventBridge, I noticed a message in LocalStack's logs indicating that the integration between EventBridge and SNS is not currently supported. I created a new issue based on this observation: localstack/localstack#3308 I think that I will continue by implementing this missing functionality in LocalStack, and after I confirm that the integration between this Mattermost plugin and LocalStack is working as expected, then I can continue with the implementation required for this ticket. |
@george-cionca Fine with me 👍 Though for the purposes of this task, it may be simpler to work with AWS directly. You should just need to communicate with the SNS service, and not CloudWatch or EventBridge. For manually testing your solution, I recommend using the I have an external integration with this feature implemented here if it is helpful https://github.com/mickmister/mattermost-sns-integration/blob/1c2a3bdfe80f6c14a69b870107fb9486e32c75ea/src/sns/client.js#L65. |
Only users listed under
AllowedUserIds
should be allowed to execute this commandThe text was updated successfully, but these errors were encountered: