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

Unknown type messages support #90

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

danilvalov
Copy link

This pull request adds support for unknown type events.

Parses and formates JSON (if the message is in JSON format) or sends plain text

Copy link
Contributor

@mickmister mickmister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work @danilvalov 🎉

Just one suggestion to control this behavior via a plugin setting, so the admin can turn this off if desired.

We would add it here

https://github.com/mattermost/mattermost-plugin-aws-SNS/blob/4d47e03243064c8efb363636a3be214e7bb442e9/plugin.json#L22-L30

and use it like the other plugin settings throughout the plugin

server/plugin.go Outdated
@@ -267,6 +268,8 @@ func (p *Plugin) handleNotification(body io.Reader, channel *TeamChannel) {
p.sendPostNotification(p.createSNSMessageNotificationAttachment(notification.Subject, messageNotification), channel)
return
}

p.sendPostNotification(p.createSNSUnknownTypeMessage(notification.Subject, notification.Message), channel)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking this behavior should be configurable in a plugin setting

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mickmister I'm not sure if I described this option correctly in Settings. Check, please

@mickmister mickmister added 2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester labels Apr 23, 2024
@danilvalov danilvalov force-pushed the feature/unknown-type-messages-support branch from ae63a3b to 4afae68 Compare April 23, 2024 21:54
@hanzei hanzei removed their request for review April 24, 2024 14:29
plugin.json Outdated Show resolved Hide resolved
Co-authored-by: Michael Kochell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants