Letting entries in¶
Nothing goes into the book until the owner says yes. This page is about that part: the message you get for each new entry, and the little page where you decide what happens to it.
The message¶
Every time someone signs, the server runs a notify command with a short message: who signed, where they're from,
whether they drew something, the message itself, and a link that looks like
https://your.site/guestbook/api/mod?id=…&token=…. On stuffs that command sends me a Signal message, which means I
see new entries on my phone right away. On your own guestbook it can be any command you like (see
Your own guestbook), and if you don't set one, the message and link go into the log file instead.
Each link only works for its own entry, because the token in it is a long random string that's made for that one entry. Keep the links to yourself.
The entry's page¶
Opening the link shows the entry the way it'll look, doodle included, and up to three buttons:
- Let it in puts it in the book. It shows up for everyone the next time they load the page.
- Hide it takes it out of the book again, or keeps it out if it never went in. A hidden entry stays in the data file, so you can change your mind later from the same link.
- Delete it removes it for good.
Opening the link on its own doesn't change anything, only pressing a button does. That matters because messaging apps open links to make a preview, and this way a preview can never let an entry in by itself.
What gets through to you¶
The server already turns away the obvious junk before it ever reaches you: entries made by robots that fill in a hidden field, entries sent within four seconds of opening the page, messages with more than one link, doodles that aren't the right size, and anyone signing more than three times in an hour or eight times in a day. So what you get is almost always a real person, and it only takes a second to say yes.
If you ever need to fix something by hand, the entries are in entries.json in the data folder, one object each.
An entry's state is pending, approved or hidden. Stop the server before you edit the file, then start it again.