Skip to content

Post digest

chandrn7 edited this page Jul 7, 2021 · 3 revisions

On Smalltown, admins can send a post digest daily or weekly with a selection of ten recent posts.

Why

Sometimes people don't want to have to check a site frequently to get updates from their network. A post digest can help people stay on top of what's happening without the need to constantly refresh their Smalltown tab. It can also help people have a healthier relationship with their social media, enabling them to take control of their attention.

How

Admins add these lines to the .env.production file:

POST_DIGEST_ENABLED=true
POST_DIGEST_HOUR=14
POST_DIGEST_DAY=3
POST_DIGEST_ZONE=America/Phoenix
  • POST_DIGEST_ENABLED is required. It's a flag that tells Smalltown to enable the post digest.
  • POST_DIGEST_HOUR is optional. It tells Smalltown at what hour to email the post digest. You must provide it in military format from 0-23. Default is 16.
  • POST_DIGEST_DAY is optional. It tells Smalltown to send the digest weekly and on what day to send it each week. You must provide the day as a number between 0-6 with 0 representing Sunday and 6 representing Saturday. Smalltown defaults to sending the digest daily. You must provide this option if you want to send the digest weekly.
  • POST_DIGEST_ZONE is optional. It tells Smalltown what timezone to use when scheduling the post digest. You must provide it in the 'Continent/City' format. A list of appropriately formatted timezones can be found here. Default is America/New_York.

Then restart Smalltown:

sudo systemctl restart mastodon-streaming.service mastodon-sidekiq.service mastodon-web.service

Appendix

Users can choose whether or not to receive post digest emails by going to their notification preferences and toggling the checkbox.

Screen Shot of post digest checkbox

If there are less than ten recent posts, all of them will be included in the post digest. If there are no recent posts, no post digest will be sent.