staltz / easy-ssb-pub

An easy-to-host server that runs an SSB "Pub"
GNU Affero General Public License v3.0
209 stars 35 forks source link

Automatically set profile name to $HOST on startup #28

Closed maackle closed 6 years ago

maackle commented 6 years ago

I'm not sure of the target audience of easy-ssb-pub, but this script will save the user from having to manually issue an sbot command on the server to set the pub name, which is definitely "easy".

This PR adds a startup step which checks for any "about" messages sent by this account. If no such messages exist, and $HOST is set, create an about message which sets the name = $HOST. Otherwise, do nothing.

If we don't do something like this, we should probably at least update the README to describe how you can set the name yourself.

staltz commented 6 years ago

Thanks @maackle !