Conversation
BREAKING CHANGE: reworks the API and types for how Events are used within this library. Removes the existing `EventType` in favor of a simpler version where event properties are expressed directly on the enum variants. Fixes some composition issues specifically with message events. Adds some additional types to better distinguish between basic messages and message subtypes that are used in the Slack Events API. Introduces the `assert-json-diff` crate to validate serialization and deserialization of different types
These tests are known to be failing. This demonstrates that the current enum implementation is incomplete compared to the examples provided by the Slack documentation
Adds additional tests to validate that data is serializing / deserializing into the expected types with expected fields
|
| GitGuardian id | Secret | Commit | Filename | |
|---|---|---|---|---|
| - | Generic High Entropy Secret | 6ac5a55 | src/event_api/event.rs | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
Fixes an issue where the fields for the `app_requested` event were defined incorrectly
|
FYI @Gompei - my motivation currently with this draft PR is to demonstrate some of the suggestions that I made in #23. My secondary goal is to add some more unit tests (as I've described in a few other PRs and issues). If you're supportive of this direction LMK - I'd like to continue through the Events API stuff presented here. |
Also adds links to Event API documentation for each variant for convenience
Adds `reaction_added`, `reaction_removed`, `pin_added`, `pin_removed` events
Adds events for `shared_channel_invite_received`, `shared_channel_invite_declined`, `shared_channel_invite_approved`, `shared_channel_invite_rejected` Fixes an typo for field in `UserProfile`
Also introduces a custom deserializer to handle string quoted integer
values ("7") and unquoted integer values (7). Note that the Slack API
documentation is ambiguous and often uses both
Note this is currently a WIP
The goal of this PR is the following
Event,EventTypeCallback) into a simpler structure. Currently there is a fair amount of abstraction that isn't really necessaryFor point two above, I've introduced the
assert-json-diffcrate which allows you to more easily find the differences between serde_jsonValueobjects. The goal is to use this to ensure that we have all the expected keys in the JSON objects.