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

feat: add file access field to file struct for slackevents #1312

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

zFlabmonsta
Copy link
Contributor

@zFlabmonsta zFlabmonsta commented Aug 15, 2024

Description

This PR consist of adding a new field, file_access to the slackevents File Object.

When a slack event is received from a slack connect channel, file data will not be included in the payload and requires an extra step to make API call to fetch the file data i.e. files.info. Slack includes the field file_access to determine this. More info https://api.slack.com/types/file#slack_connect_files

@zFlabmonsta
Copy link
Contributor Author

hi @lorenzoaiello could i get a PR review 🙇

Copy link

@manted manted left a comment

Choose a reason for hiding this comment

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

👍

@lorenzoaiello lorenzoaiello changed the title add file access field to file struct for slackevents feat: add file access field to file struct for slackevents Aug 15, 2024
@lorenzoaiello lorenzoaiello added enhancement RTM API about Real Time Messaging API SocketMode about SocketMode labels Aug 15, 2024
@lorenzoaiello lorenzoaiello self-assigned this Aug 15, 2024
@lorenzoaiello lorenzoaiello merged commit 75103a9 into slack-go:master Aug 15, 2024
6 checks passed
renovate bot referenced this pull request in validator-labs/validator Aug 15, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/slack-go/slack](https://togithub.com/slack-go/slack) |
`v0.13.1` -> `v0.14.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fslack-go%2fslack/v0.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fslack-go%2fslack/v0.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fslack-go%2fslack/v0.13.1/v0.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fslack-go%2fslack/v0.13.1/v0.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>slack-go/slack (github.com/slack-go/slack)</summary>

###
[`v0.14.0`](https://togithub.com/slack-go/slack/releases/tag/v0.14.0)

[Compare
Source](https://togithub.com/slack-go/slack/compare/v0.13.1...v0.14.0)

#### What's Changed

v0.14.0 is now available. It contains **no breaking changes** but does
include several pieces of new functionality and long-standing bug fixes.

##### Enhancements

- Added Support for receiving `metadata` when receiving a `MessageEvent`
over WebSocket by [@&#8203;rfratto](https://togithub.com/rfratto) in
[https://github.com/slack-go/slack/pull/1307](https://togithub.com/slack-go/slack/pull/1307)
- Added a new field to expose file data when receiving a `File` event
from a Slack Connect Channel by
[@&#8203;zFlabmonsta](https://togithub.com/zFlabmonsta) in
[https://github.com/slack-go/slack/pull/1312](https://togithub.com/slack-go/slack/pull/1312)
- Added support for the `slack_file` in the image block by
[@&#8203;rhysm](https://togithub.com/rhysm) in
[https://github.com/slack-go/slack/pull/1311](https://togithub.com/slack-go/slack/pull/1311)
- Added 35 missing Websocket event types by
[@&#8203;Aryakoste](https://togithub.com/Aryakoste) in
[https://github.com/slack-go/slack/pull/1306](https://togithub.com/slack-go/slack/pull/1306)
- Added support for parsing `AppRateLimited` events in the `ParseEvent`
function by [@&#8203;nemuvski](https://togithub.com/nemuvski) in
[https://github.com/slack-go/slack/pull/1308](https://togithub.com/slack-go/slack/pull/1308)
- Added newly documented Channel Canvas properties to the
`conversations.info` Web API method by
[@&#8203;ku](https://togithub.com/ku) in
[https://github.com/slack-go/slack/pull/1228](https://togithub.com/slack-go/slack/pull/1228)

##### Bug Fixes

- Fixed an edge case when using `UpdateRemoteFileContext` and
`UpdateRemoteFile` and Image Previews would return an `invalid_auth`
error by [@&#8203;EkeMinusYou](https://togithub.com/EkeMinusYou) in
[https://github.com/slack-go/slack/pull/1117](https://togithub.com/slack-go/slack/pull/1117)

##### Chores / Code Cleanup

- Replaced deprecated `ioutil` with `io` and `os` packages by
[@&#8203;nakamasato](https://togithub.com/nakamasato) in
[https://github.com/slack-go/slack/pull/1310](https://togithub.com/slack-go/slack/pull/1310)

#### New Contributors

- [@&#8203;rfratto](https://togithub.com/rfratto) made their first
contribution in
[https://github.com/slack-go/slack/pull/1307](https://togithub.com/slack-go/slack/pull/1307)
- [@&#8203;nakamasato](https://togithub.com/nakamasato) made their first
contribution in
[https://github.com/slack-go/slack/pull/1310](https://togithub.com/slack-go/slack/pull/1310)
- [@&#8203;rhysm](https://togithub.com/rhysm) made their first
contribution in
[https://github.com/slack-go/slack/pull/1311](https://togithub.com/slack-go/slack/pull/1311)
- [@&#8203;Aryakoste](https://togithub.com/Aryakoste) made their first
contribution in
[https://github.com/slack-go/slack/pull/1306](https://togithub.com/slack-go/slack/pull/1306)
- [@&#8203;nemuvski](https://togithub.com/nemuvski) made their first
contribution in
[https://github.com/slack-go/slack/pull/1308](https://togithub.com/slack-go/slack/pull/1308)
- [@&#8203;ku](https://togithub.com/ku) made their first contribution in
[https://github.com/slack-go/slack/pull/1228](https://togithub.com/slack-go/slack/pull/1228)
- [@&#8203;EkeMinusYou](https://togithub.com/EkeMinusYou) made their
first contribution in
[https://github.com/slack-go/slack/pull/1117](https://togithub.com/slack-go/slack/pull/1117)
- [@&#8203;jjjjeeffff](https://togithub.com/jjjjeeffff) was instrumental
in the successful resolution of
[https://github.com/slack-go/slack/pull/1117](https://togithub.com/slack-go/slack/pull/1117)

**Full Changelog**:
slack-go/slack@v0.13.1...v0.14.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/validator-labs/validator).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIiwiZ28iXX0=-->

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement RTM API about Real Time Messaging API SocketMode about SocketMode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants