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

Penny should save a list of images submitted in DMs #27

Closed
adamsullovey opened this issue Jul 26, 2017 · 4 comments
Closed

Penny should save a list of images submitted in DMs #27

adamsullovey opened this issue Jul 26, 2017 · 4 comments

Comments

@adamsullovey
Copy link
Contributor

Finished drawings are sent to Penny as DMs (#23 (comment))

Maybe if you send a file with the comment 'submit drawing', that will trigger penny to save some info about the file (image URL on Slack's hosting & who submitted it at least) to a text file, similar to prompts. That text file can be read by gallery generator or penny later.

There's also files.list API call that I haven't tried out yet.

There might be permissions issues with the files if they are intended for only the submitter & penny to view. Maybe we'll have to use the API to change permissions, or copy images to another host when they are shown in a gallery.

@adamsullovey
Copy link
Contributor Author

I started this here:
https://github.com/the-heap/penny/compare/master...adamsullovey:bot-saves-drawing-submissions?expand=1

Some things up for debate:

  • should all attachments shared with penny be considered image submissions?
  • if not, is 'submit drawing' a good prompt for the user?
  • does this work well on phones for people who take pictures of their drawings?

@teesloane
Copy link
Contributor

I think that submit drawing should be a good place to start with.

I think if we can work with just images that would be good too.


Just looking over some of the code.

Do you think we should define function handleDrawingSubmission(message)
outside of the receive message function? onReceiveMessage is called, handleDrawingSubmission is redefined. Might make sense to move it outside of the function. Could also keep the code a bit more organized.

Thoughts?

@adamsullovey
Copy link
Contributor Author

adamsullovey commented Jul 27, 2017

function moved! That was easy and sensible. PR time! no wait, it still needs to filter out files that aren't attachments in case someone submits an mp3 or something else unexpected.

@teesloane
Copy link
Contributor

Good call; nice catch! looking forward to the PR!

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

No branches or pull requests

2 participants