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(slack): allow receiving file/audio/video/image #573

Merged
merged 2 commits into from
Jul 31, 2023

Conversation

davidvitora
Copy link
Contributor

This PR adds support for receiving files (file/audio/video/image) with Slack (channel v1.0.0 only).

Similar to #543

Also updated sqlite3 since install is failing on Mac M1

await this.service.receive(
scope,
{ identity: '*', sender: message.user, thread: message.channel },
{ type: this.mapMimeTypeToStandardType(file.mimetype), url: file.url_private, title: file.title }
Copy link
Member

Choose a reason for hiding this comment

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

is url_private reachable ? or is it actually private

Copy link
Contributor Author

@davidvitora davidvitora May 11, 2023

Choose a reason for hiding this comment

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

@EFF It is private, meaning that only people with access to the organization that the Bot is part of will have access to that image, but at the same time, only people from the org will have access to the bot anyways. The only way to have a public image, in this case, would be to have a service to re-upload those images to S3 (which we don't have to any channel, including those where the generated Image URL is temporary[telegram]).
At the same time, it's totally possible to download this image in a hook using the botToken and the Slack API and upload it somewhere else.

OBS: There is no public URL available in the payload received

@EFF
Copy link
Member

EFF commented May 11, 2023

Did you try to build and test a docker image ? Just to make sure sqlite works. It always been a tricky dep to update.

@davidvitora
Copy link
Contributor Author

davidvitora commented May 11, 2023

Did you try to build and test a docker image ? Just to make sure sqlite works. It always been a tricky dep to update.

@EFF I tested it locally using a standalone messaging server that connects to my PG database (this sqlite update was just so I'm able to build it). My Botpress instance points to the same database.

We will do more testing with the full server as soon as we have this merged, so if something happens, I will fix this repo too

@davidvitora davidvitora requested a review from EFF May 15, 2023 14:27
@EFF
Copy link
Member

EFF commented May 30, 2023

@davidvitora any updates ?

@davidvitora
Copy link
Contributor Author

@EFF Hey Eff, I believe that I answered your question regarding this PR. Is there anything else missing on my side?

@davidvitora davidvitora merged commit 167a9c3 into master Jul 31, 2023
@davidvitora davidvitora deleted the dv_add_file_upload_slack branch July 31, 2023 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants