Repository metrics
- Stars
- (338 stars)
- PR merge metrics
- (30d に merged PR はありません)
説明
In last few commits, I have implemented a basic Slack bot functionality. This is how it works:
- Users can add the bot to their workspace by going to https://learnawesome.org/join_slack

- This slack app needs the following Oauth permission scopes:
chat:write,chat:write.public,commands

-
Once the permission is granted, the access token is stored in
SlackAuthorizationtable. -
This bot currently adds two slash commands:
/startlearning [topic]and/stoplearning [topic]. Using these commands, slack teams' channels can subscribe/unsubscribe to topics. These subscriptions are kept inSlackSubscriptiontable which has a schema(slack_authorization_id, channel_id, topic_id) -
Whenever a new item is created, all such channels are notified by
SlackSubscriptionNotifyJob. -
This is different from
SlackNotifyJobwhich is used only in our own slack to post items from ALL topics to the#new-itemschannel. BTW, we also post a random topic to our#generalchannel inSocialMediaUpdatesJobevery day at 13:00 UTC.

Enhancement ideas
- Post daily updates to slack subscriptions so that they don't have to wait till a new item gets added
- Enable conversations and on-demand resources