learn-awesome / learn

A social network of lifelong learners built around humanity's universal learning map.
https://learnawesome.org/
Other
343 stars 40 forks source link

Finish Twitter Bot #228

Closed teampolyglot closed 3 years ago

teampolyglot commented 3 years ago

Look at app/jobs/twitter_bot_job.rb

Twitter will invoke this via a webhook whenever someone mentions @learn_awesome in a tweet. This job should find a topic in that tweet and a URL in either that tweet or its parent tweet, and find or create an item with that topic. Then it should reply to that user.

We need to make sure that user who posted the tweet is allowed (admin or a signed up user).

The WIP version was pushed in this commit: https://github.com/learn-awesome/learn/commit/e6905dc5abbbd48cef416a4bd3dfc8e501608fa8

teampolyglot commented 3 years ago

It would be nice if the tweet text can be like "@learn_awesome I want to learn this" or "mark this as currently learning" and the job updates the review status for this (user,item). If the tweeter is not a LearnAwesome user, we can reply with a message: "You should sign up on LearnAwesome to be able to discover learning resources and track your learning progress".