Skip to main content

November 9

Hi all, hope you're doing well. Updates below.

My health is getting worse and worse, so fairly short update today.

When searching for artworks, the gallery SQL stored procedure now uses a set list of mime types to compare against to exclude images/videos when necessary, rather than a trailing wildcard which is slower.

A major improvement, both to the performance of the query and to caching its results for later use, are that blocks/mutes/hides are no longer queried against in the procedure. Instead, the results returned by the procedure are filtered server-side in PHP to remove any entries that the requesting user has blocked/muted/hidden. This both reduces the query complexity, and means that caching the results is much more efficient, as if the user's blocks/mutes/hides are accounted for in the query, it can only be cached for that particular user.

I need to test that the server-side filtering doesn't mess with JS gallery limit/offset end-of-gallery detection, I don't think it will but I need to double check that.

Display Artwork page improvements

I've implemented the display for showing when an artwork was commissioned by a user, rather than being made by the user themselves. A box is displayed in the artist details area, showing who drew the artwork, with either an internal link to the artist's Deserted Chateau profile or an external link to their social media or other website, that is provided by the user who uploads the artwork.

Font Awesome didn't have an icon I thought was suitable for this, so I found one that can be purchased for commercial use which does a good job of conveying the information to the user, which you can see on the left hand side of the commission info box.

image.png

Automated deployment

I've implemented classes and scripts to export most of Deserted Chateau's AWS resources to local text files and zip files (for Lambda function and layer code). This will come in handy later for backup purposes, and I've used it to rename certain resources in the test environment that can't be renamed and have to be re-created with a new name, which is a tedious process to do manually.

Improving the deployment scripts to also import into, say, a new AWS account is a bit more difficult. Things like AWS IAM policies have account-specific ARNs (Amazon Resource Names) in them, meaning that certain values have to be replaced, such as account IDs and AWS region identifiers. I've made a lot of progress on that, and the import and export scripts are (mostly) finished and ready to use, though there are some additional resources I haven't implemented in them yet, such as VPC security groups.

Moderation

I've made some progress in refactoring the JavaScript for the different moderation modals (users, artworks, artwork comments) to be in their own separate classes, as until now they all sat in the Reports.js class. 

Outside of that, I've been considering some more ways to reduce the moderation burden. One possibility is for artists to temporarily connect their Twitter accounts (and then disconnect them, if they want) to prove they own that Twitter account, reducing the problem of dealing with accounts that post other people's work or impersonate an artist and upload their art.

Another thought is to require users who want to post content, i.e artworks or comments, to verify themselves with a microtransaction of $0.50 which is the minimum charge Stripe allows. That way, Deserted Chateau would have a much more effective system against ban evasion and spam accounts, since a banned user who makes a new account would have to pay again, and they'd need a new payment method each time or else it would show as being the same user. This wouldn't be a viable solution for a social media site, where botnets and the like are profitable, but for Deserted Chateau it could work well.

The aim of the micropayment verification idea isn't to make money out of it; Stripe's transaction fee will take the majority of the payment. I'd prefer to be able to make it an even smaller payment, but Stripe's minimum charge prevents that. It doesn't need to be an annual charge, just a one-off payment, as an annual charge wouldn't do anything to improve the verification use case the micropayment provides so there's no need or justification for it.

Misc / Bug Fixes

  • Corrected some database queries in Lambda functions, including the user deactivation handler.

  • Default profile pictures have been changed from a Font Awesome icon + background styling to an image, for easier backend code standards where showing a user's profile picture is concerned.