commentID's aren't neccesarily = to the index, so instead of using it as an index, I just use a for loop to find the matching comment.
I also added another form at the bottom of the timeline to trick bots
Signed-off-by: deadvey <deadvey@deadvey.com>
Removed the string object from config.json as it's now all in the locale.
and I fixed data.getdata() to return an error code if the index is out of bounds, it now returns a 1.
Signed-off-by: deadvey <deadvey@deadvey.com>
So you don't have to restart the server, you can add "cache_data": false option to config.json to not cache data.
Documented in CONFIG.md
I added a require_module function that either does or does not cache the data based on this configuration option.
Signed-off-by: deadvey <deadvey@deadvey.com>
Hitcount updates visually, previously it just showed 1 on the frontend as the value wasn't actually being retrieved from the data.getdata()
Signed-off-by: deadvey <deadvey@deadvey.com>
I fixed the comment submission to use the new way of storing comments and their counter.
I also fixed the AI-consent field in en-US because I accidently had · instead of spaces (from when I copy pasted from vim)
Signed-off-by: deadvey <deadvey@deadvey.com>
data.getdata() excepts two parameters, if desired, the second will be the index, however if you don't specify anything, the whole array will be returned
Also, comments now have a composite key of postID-commentID, with each post's comments having their own set starting at 0, this makes it easier to index and find a specific comment, and making the getcomment() function unessesary
Seperated all routes into seperate files for neatness, and I've made the comments.json store only the comments, comments_counter is in the new data.json file which also stores the hitcount.
Signed-off-by: max <deadvey@localhost.localdomain>
are often entered with a space after each comma.
This uses .trim() in func.render_tags() to remove when rendering as well
as .map(str => str.trim()) when a post or post edit is submitted so they
are also stored without spaces.